- Timestamp:
- Jul 13, 2014, 12:13:33 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/docs/Changelog
r454 r456 4 4 * Allow multiple exclusions for SUID check 5 5 * Use calloc instead of malloc 6 * Add overflow check in minilzo.c (but the potential integer 7 overflow [CVE-2014-4607,LMS-2014-06-16-1] is irrelevant anyway 8 because the function is never used on external data). 9 * Fixed a minor bug in exepack_fill.c that was unearthed by the minilzo 10 overflow check (the required buffer length information for the check 11 wasn't provided) 6 12 7 13 3.1.1 (01-0-2014): -
trunk/src/exepack.c
r1 r456 84 84 { 85 85 int file; 86 long result; 86 87 87 88 unsigned long i = argc; /* dummy use of argc to fix compiler warning */ … … 129 130 out_len = (unsigned long) programlen_compressed_0; 130 131 len = (unsigned long) programlen_0; 132 in_len = len; 131 133 132 134 outbuf = program_0; … … 260 262 } 261 263 262 write(file, inbuf, in_len); 264 result = (long) write(file, inbuf, in_len); 265 if (result < 0 || in_len != (lzo_uint) result) 266 { 267 return (5); 268 } 263 269 264 270 #if defined(__linux__) … … 266 272 if ( 0 != fstat(file, &sbuf)) 267 273 { 268 return ( 5);274 return (6); 269 275 } 270 276 … … 276 282 if ( 0 != fstat(file, &fbuf)) 277 283 { 278 return ( 6);284 return (7); 279 285 } 280 286 … … 288 294 { 289 295 close ( file ); 290 return ( 6);296 return ( 8 ); 291 297 } 292 298 … … 312 318 fcntl (file, F_SETFD, FD_CLOEXEC); 313 319 execve (pname, argv, environ); 314 return ( 8);320 return (9); 315 321 } 316 322 #endif … … 325 331 execve (fname, argv, environ); 326 332 unlink (fname); 327 return ( 9);333 return (10); 328 334 } 329 335 else if (i == 0) -
trunk/src/exepack_fill.c
r1 r456 169 169 { 170 170 FILE * fd; 171 long clen;171 unsigned long clen; 172 172 char * data; 173 173 struct stat sbuf; … … 222 222 return (-1); 223 223 224 fread (data, 1, clen, fd); 224 if (clen != fread (data, 1, clen, fd)) 225 return (-1); 225 226 fclose (fd); 226 227 … … 337 338 return (8); 338 339 } 339 status = replaceData (data, clen, "CONTAINER", outbuf, out_len);340 status = replaceData (data, clen, "CONTAINER", (char *) outbuf, out_len); 340 341 if (status < 0) 341 342 {
Note:
See TracChangeset
for help on using the changeset viewer.