Changeset ef06c74 in mod_gnutls for src/gnutls_ocsp.c
- Timestamp:
- Jun 18, 2016, 3:18:36 PM (5 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, master, proxy-ticket, upstream
- Children:
- f1147b6
- Parents:
- ac3f500
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_ocsp.c
rac3f500 ref06c74 393 393 * (unsigned int) and fplen (size_t) may have different 394 394 * lengths. */ 395 #if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__) 396 if (__builtin_expect(fplen <= UINT_MAX, 1)) 397 { 398 fingerprint.size = (unsigned int) fplen; 399 fingerprint.data = fp; 400 } 401 #else 395 402 if (__builtin_add_overflow(fplen, 0, &fingerprint.size)) 396 403 fingerprint.size = 0; 397 404 else 398 405 fingerprint.data = fp; 406 #endif 399 407 return fingerprint; 400 408 } … … 541 549 } 542 550 543 /* With the length restriction this really should not happen. */ 551 /* With the length restriction this really should not overflow. */ 552 #if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__) 553 if (__builtin_expect(len > UINT_MAX, 0)) 554 #else 544 555 if (__builtin_add_overflow(len, 0, &response->size)) 556 #endif 545 557 { 546 558 response->data = NULL; … … 549 561 else 550 562 { 563 #if defined(__GNUC__) && __GNUC__ < 5 && !defined(__clang__) 564 response->size = (unsigned int) len; 565 #endif 551 566 response->data = apr_pmemdup(p, buf, len); 552 567 }
Note: See TracChangeset
for help on using the changeset viewer.