mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-11-03 21:02:36 +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:
		@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user