mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-28 12:29:40 +00:00
Fix overruning the urls buffer
Technically, MAX_URL_PATHS would be one past the buffer allocated, so it needs to stay under that value.
This commit is contained in:
parent
5e1c366e0b
commit
4ed9219704
@ -181,7 +181,7 @@ int main(int argc, char* argv[]) {
|
||||
memset(filename, 0, MAX_FILE_LEN);
|
||||
for (i=0; i < argc; i++) {
|
||||
if (strstr(argv[i], ":") > 0) {
|
||||
if (j <= MAX_URL_PATHS) {
|
||||
if (j < MAX_URL_PATHS) {
|
||||
urls[j] = argv[i];
|
||||
tmp = strrchr(urls[j++], '/');
|
||||
strncpy(filename, tmp, MAX_FILE_LEN);
|
||||
|
Loading…
Reference in New Issue
Block a user