Bugzilla – Attachment 1607 Details for
Bug 1562
EXPAND_MAX_KEYS in percent_expand is actually (EXPAND_MAX_KEYS - 1)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
suggested patch
percent_expand.diff (text/plain), 881 bytes, created by
Jan Pechanec
on 2009-02-26 02:27:54 AEDT
(
hide
)
Description:
suggested patch
Filename:
MIME Type:
Creator:
Jan Pechanec
Created:
2009-02-26 02:27:54 AEDT
Size:
881 bytes
patch
obsolete
>--- misc.c Wed Feb 25 15:46:00 2009 >+++ misc2.c Wed Feb 25 15:46:57 2009 >@@ -578,11 +578,16 @@ > if (keys[num_keys].repl == NULL) > fatal("percent_expand: NULL replacement"); > } >- va_end(ap); > >- if (num_keys >= EXPAND_MAX_KEYS) >+ /* >+ * If num_keys is equal to EXPAND_MAX_KEYS we must surely have at least >+ * the terminating NULL on the stack. >+ */ >+ if (num_keys == EXPAND_MAX_KEYS && va_arg(ap, char *) != NULL) > fatal("percent_expand: too many keys"); > >+ va_end(ap); >+ > /* Expand string */ > *buf = '\0'; > for (i = 0; *string != '\0'; string++) { >@@ -595,6 +600,7 @@ > continue; > } > string++; >+ /* %% case */ > if (*string == '%') > goto append; > for (j = 0; j < num_keys; j++) { >@@ -605,7 +611,7 @@ > break; > } > } >- if (j >= num_keys) >+ if (j == num_keys) > fatal("percent_expand: unknown key %%%c", *string); > } > return (xstrdup(buf));
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1562
: 1607