Fix possible bufferoverflow with strncpy
This commit is contained in:
		@@ -93,7 +93,8 @@ static shellmatta_retCode_t shell_cmd_digio_set(const shellmatta_handle_t   hand
 | 
				
			|||||||
	char buff[64];
 | 
						char buff[64];
 | 
				
			||||||
	char *curr_token;
 | 
						char *curr_token;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	strncpy(buff, arguments, sizeof(buff));
 | 
						strncpy(buff, arguments, sizeof(buff)-1);
 | 
				
			||||||
 | 
						buff[63] = '\0';
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	curr_token = strtok(buff, " ");
 | 
						curr_token = strtok(buff, " ");
 | 
				
			||||||
	curr_token = strtok(NULL, " ");
 | 
						curr_token = strtok(NULL, " ");
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user