Details
- 
    
Bug
 - 
    Status: Open (View Workflow)
 - 
    
Minor
 - 
    Resolution: Unresolved
 - 
    10.2.9
 
Description
					mariadb-10.2.9/storage/connect/tabmac.cpp:369] -> [mariadb-10.2.9/storage/connect/tabmac.cpp:371]: (performance) Buffer 'buf' is being written before its old content has been used.
			 | 
		
Source code is
					if ((p = strstr(adp->Description, " - Packet Scheduler Miniport"))) {  | 
		
					strncpy(buf, adp->Description, p - adp->Description);  | 
		
					        i = p - adp->Description;
			 | 
		
					strncpy(buf, adp->Description, i);  | 
		
					        buf[i] = 0;
			 | 
		
The first call to strncpy looks pointless.