forked from mirrors/gecko-dev
		
	 ced65109b9
			
		
	
	
		ced65109b9
		
	
	
	
	
		
			
			Check the size argument passed to strncat for common erroneous patterns. There are currently no clang-analyzer-unix.cstring.BadSizeArg warnings in mozilla-central! https://clang-analyzer.llvm.org/available_checks.html MozReview-Commit-ID: DUI3ZNIBoLQ --HG-- extra : source : 8dafc73215cddd2737b4d8dbcb926521736d98c2 extra : histedit_source : ed27a98e47c01c9951c03eb2129ed4997f3cf624
		
			
				
	
	
		
			9 lines
		
	
	
	
		
			192 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			9 lines
		
	
	
	
		
			192 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| // https://clang-analyzer.llvm.org/available_checks.html
 | |
| 
 | |
| #include "structures.h"
 | |
| 
 | |
| void test()
 | |
| {
 | |
|   char dest[3];
 | |
|   strncat(dest, "***", sizeof(dest)); // warning : potential buffer overflow
 | |
| }
 |