diff --git a/ChangeLog b/ChangeLog index fd27ec7..36920ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-09-26 Anders Carlsson + + * pkg.c (verify_package): Use strncmp when checking for + the -I prefix. + 2002-09-19 Havoc Pennington * configure.in: 0.13 diff --git a/pkg.c b/pkg.c index 8b57d5d..b9e5707 100644 --- a/pkg.c +++ b/pkg.c @@ -801,8 +801,8 @@ verify_package (Package *pkg) /* we put things in canonical -I/usr/include (vs. -I /usr/include) format, * but if someone changes it later we may as well be robust */ - if (((strcmp (iter->data, "-I") == 0) && (offset = 2))|| - ((strcmp (iter->data, "-I ") == 0) && (offset = 3))) + if (((strncmp (iter->data, "-I", 2) == 0) && (offset = 2))|| + ((strncmp (iter->data, "-I ", 3) == 0) && (offset = 3))) { if (offset == 0) {