diff options
author | wtchang%redhat.com <devnull@localhost> | 2005-03-14 21:40:15 +0000 |
---|---|---|
committer | wtchang%redhat.com <devnull@localhost> | 2005-03-14 21:40:15 +0000 |
commit | fa3dcdcc5e748439ffc4ddac388094e6f8eb485c (patch) | |
tree | f45b8841bbeae77e98bd1fb453acf920b48582cb | |
parent | 061ea0edeb3337344a866ed791f49d6e831f82bb (diff) | |
download | nspr-hg-fa3dcdcc5e748439ffc4ddac388094e6f8eb485c.tar.gz |
Bugzilla Bugs 255633, 285934: '-' must be the first or last character in
a scanlist, otherwise some implementations may interpret it to mean a
range of characters. Thanks to Frank Wein <bugzilla@mcsmurf.de> for the
bug report and suggesting the fix.
-rw-r--r-- | pr/src/io/prlog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pr/src/io/prlog.c b/pr/src/io/prlog.c index fea940c6..ab348d4f 100644 --- a/pr/src/io/prlog.c +++ b/pr/src/io/prlog.c @@ -219,7 +219,7 @@ void _PR_InitLog(void) PRInt32 bufSize = DEFAULT_BUF_SIZE; while (pos < evlen) { PRIntn level = 1, count = 0, delta = 0; - count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n", + count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-]%n:%d%n", module, &delta, &level, &delta); pos += delta; if (count == 0) break; @@ -328,7 +328,7 @@ static void _PR_SetLogModuleLevel( PRLogModuleInfo *lm ) while (pos < evlen) { PRIntn level = 1, count = 0, delta = 0; - count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_]%n:%d%n", + count = sscanf(&ev[pos], "%63[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-]%n:%d%n", module, &delta, &level, &delta); pos += delta; if (count == 0) break; |