diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 | 
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2019-12-28 05:27:06 +0000 | 
| commit | e2fe726866d062155f6b1aae749375475ef19191 (patch) | |
| tree | fe6b00611d5c987d2c12c32063891ae19295ffeb /compat/snprintf.c | |
| parent | 366b94c4a9552acfb560d3234aea0955ebc1eb8e (diff) | |
Diffstat (limited to 'compat/snprintf.c')
| -rw-r--r-- | compat/snprintf.c | 7 | 
1 files changed, 5 insertions, 2 deletions
| diff --git a/compat/snprintf.c b/compat/snprintf.c index 97cd7061f5c9..bab873e30793 100644 --- a/compat/snprintf.c +++ b/compat/snprintf.c @@ -658,7 +658,7 @@ int vsnprintf(char* str, size_t size, const char* format, va_list arg)  		 * are not their own functions. */  		/* printout designation: -		 * conversion specifier: x, d, u, s, c, n, m, p +		 * conversion specifier: x, d, u, s, c, m, p  		 * flags: # not supported  		 *        0 zeropad (on the left)  		 *	  - left adjust (right by default) @@ -798,7 +798,10 @@ int vsnprintf(char* str, size_t size, const char* format, va_list arg)  				minw, minus);  			break;  		case 'n': -			*va_arg(arg, int*) = ret; +			/* unsupported to harden against format string +			 * exploitation, +			 * handled like an unknown format specifier. */ +			/* *va_arg(arg, int*) = ret; */  			break;  		case 'm':  			print_str(&at, &left, &ret, strerror(errno), | 
