Module Name: src Committed By: riastradh Date: Thu Aug 4 09:02:29 UTC 2022
Modified Files: src/common/lib/libprop: prop_object.c Log Message: proplib: Fix mistake in previous -- use strncmp for prefix matching. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/common/lib/libprop/prop_object.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/common/lib/libprop/prop_object.c diff -u src/common/lib/libprop/prop_object.c:1.33 src/common/lib/libprop/prop_object.c:1.34 --- src/common/lib/libprop/prop_object.c:1.33 Wed Aug 3 21:20:21 2022 +++ src/common/lib/libprop/prop_object.c Thu Aug 4 09:02:29 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: prop_object.c,v 1.33 2022/08/03 21:20:21 riastradh Exp $ */ +/* $NetBSD: prop_object.c,v 1.34 2022/08/04 09:02:29 riastradh Exp $ */ /*- * Copyright (c) 2006, 2007 The NetBSD Foundation, Inc. @@ -735,7 +735,7 @@ _prop_object_internalize_context_alloc(c if (_PROP_EOF(*xml) || *xml != '<') goto bad; -#define MATCH(str) (strcmp(&xml[1], str) == 0) +#define MATCH(str) (strncmp(&xml[1], str, strlen(str)) == 0) /* * Skip over the XML preamble that Apple XML property