mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Ron Zapp <rzapper@yahoo.com> corrected a sprintf() problem
This commit is contained in:
parent
bc375152b1
commit
bcc8f8f11a
@ -277,7 +277,8 @@ char *next_url(URLGlob *glob) {
|
|||||||
*buf++ = pat->content.CharRange.ptr_c;
|
*buf++ = pat->content.CharRange.ptr_c;
|
||||||
break;
|
break;
|
||||||
case UPTNumRange:
|
case UPTNumRange:
|
||||||
buf += sprintf(buf, "%0*d", pat->content.NumRange.padlength, pat->content.NumRange.ptr_n);
|
sprintf(buf, "%0*d", pat->content.NumRange.padlength, pat->content.NumRange.ptr_n);
|
||||||
|
buf += strlen(buf); /* make no sprint() return code assumptions */
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("internal error: invalid pattern type (%d)\n", pat->type);
|
printf("internal error: invalid pattern type (%d)\n", pat->type);
|
||||||
@ -316,7 +317,8 @@ char *match_url(char *filename, URLGlob glob) {
|
|||||||
*buf++ = pat.content.CharRange.ptr_c;
|
*buf++ = pat.content.CharRange.ptr_c;
|
||||||
break;
|
break;
|
||||||
case UPTNumRange:
|
case UPTNumRange:
|
||||||
buf += sprintf(buf, "%0*d", pat.content.NumRange.padlength, pat.content.NumRange.ptr_n);
|
sprintf(buf, "%0*d", pat.content.NumRange.padlength, pat.content.NumRange.ptr_n);
|
||||||
|
buf += strlen(buf);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
printf("internal error: invalid pattern type (%d)\n", pat.type);
|
printf("internal error: invalid pattern type (%d)\n", pat.type);
|
||||||
|
Loading…
Reference in New Issue
Block a user