Fixed a xbps_pkgpattern_name() crash and a test to reproduce it (found by Gottox).
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*-
|
||||
* Copyright (c) 2012-2013 Juan Romero Pardines.
|
||||
* Copyright (c) 2012-2014 Juan Romero Pardines.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
@@ -64,6 +64,7 @@ ATF_TC_BODY(util_test, tc)
|
||||
ATF_REQUIRE_STREQ(xbps_pkgpattern_name("systemd-[0-9]*"), "systemd");
|
||||
ATF_REQUIRE_STREQ(xbps_pkgpattern_name("systemd>4[3-9]?"), "systemd");
|
||||
ATF_REQUIRE_STREQ(xbps_pkgpattern_name("systemd<4_1?"), "systemd");
|
||||
ATF_CHECK_EQ(xbps_pkgpattern_name("*nslookup"), NULL);
|
||||
}
|
||||
|
||||
ATF_TP_ADD_TCS(tp)
|
||||
|
Reference in New Issue
Block a user