Changeset 22 for trunk/src/sh_tiger0.c
- Timestamp:
- Feb 23, 2006, 12:03:58 AM (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/sh_tiger0.c
r20 r22 1392 1392 } 1393 1393 1394 int sh_tiger_hashtype (c har * c)1394 int sh_tiger_hashtype (const char * c) 1395 1395 { 1396 1396 SL_ENTER( _("sh_tiger_hashtype")); … … 1460 1460 if (res != NULL) 1461 1461 { 1462 /*@-bufferoverflowhigh -formatconst@*/1463 1462 #if defined(TIGER_64_BIT) 1464 sprintf(out, /* known to fit */ 1465 MYFORMAT, 1466 (sh_word32)(res[0]>>32), 1467 (sh_word32)(res[0]), 1468 (sh_word32)(res[1]>>32), 1469 (sh_word32)(res[1]), 1470 (sh_word32)(res[2]>>32), 1471 (sh_word32)(res[2]) ); 1463 sl_snprintf(out, 1464 sizeof(out), 1465 MYFORMAT, 1466 (sh_word32)(res[0]>>32), 1467 (sh_word32)(res[0]), 1468 (sh_word32)(res[1]>>32), 1469 (sh_word32)(res[1]), 1470 (sh_word32)(res[2]>>32), 1471 (sh_word32)(res[2]) ); 1472 1472 #else 1473 s printf(out, /* known to fit */1474 MYFORMAT,1475 (sh_word32)(res[1]),1476 (sh_word32)(res[0]),1477 (sh_word32)(res[3]),1478 (sh_word32)(res[2]),1479 (sh_word32)(res[5]),1480 (sh_word32)(res[4]) );1481 #endif 1482 /*@+bufferoverflowhigh@*/ 1483 out[ KEY_LEN] = '\0';1473 sl_snprintf(out, 1474 sizeof(out), 1475 MYFORMAT, 1476 (sh_word32)(res[1]), 1477 (sh_word32)(res[0]), 1478 (sh_word32)(res[3]), 1479 (sh_word32)(res[2]), 1480 (sh_word32)(res[5]), 1481 (sh_word32)(res[4]) ); 1482 #endif 1483 out[sizeof(out)-1] = '\0'; 1484 1484 SL_RETURN( out, _("sh_tiger_hash_internal")); 1485 1485 … … 1507 1507 if (res != NULL) 1508 1508 { 1509 /*@-bufferoverflowhigh -formatconst@*/1510 1509 #if defined(TIGER_64_BIT) 1511 sprintf(outhash, /* known to fit */ 1512 GPGFORMAT, 1513 (sh_word32)(res[0]>>32), 1514 (sh_word32)(res[0]), 1515 (sh_word32)(res[1]>>32), 1516 (sh_word32)(res[1]), 1517 (sh_word32)(res[2]>>32), 1518 (sh_word32)(res[2]) ); 1510 sl_snprintf(outhash, 1511 sizeof(outhash), 1512 GPGFORMAT, 1513 (sh_word32)(res[0]>>32), 1514 (sh_word32)(res[0]), 1515 (sh_word32)(res[1]>>32), 1516 (sh_word32)(res[1]), 1517 (sh_word32)(res[2]>>32), 1518 (sh_word32)(res[2]) ); 1519 1519 #else 1520 s printf(outhash, /* known to fit */1521 GPGFORMAT,1522 (sh_word32)(res[1]),1523 (sh_word32)(res[0]),1524 (sh_word32)(res[3]),1525 (sh_word32)(res[2]),1526 (sh_word32)(res[5]),1527 (sh_word32)(res[4]) );1528 #endif 1529 /*@+bufferoverflowhigh@*/ 1530 outhash[ 48 + 6] = '\0';1520 sl_snprintf(outhash, 1521 sizeof(outhash), 1522 GPGFORMAT, 1523 (sh_word32)(res[1]), 1524 (sh_word32)(res[0]), 1525 (sh_word32)(res[3]), 1526 (sh_word32)(res[2]), 1527 (sh_word32)(res[5]), 1528 (sh_word32)(res[4]) ); 1529 #endif 1530 outhash[sizeof(outhash)-1] = '\0'; 1531 1531 } 1532 1532 else 1533 1533 { 1534 /*@-bufferoverflowhigh@*/ 1535 sprintf(outhash, /* known to fit */ 1536 _("00000000 00000000 00000000 00000000 00000000 00000000")); 1537 /*@+bufferoverflowhigh@*/ 1534 sl_strlcpy(outhash, 1535 _("00000000 00000000 00000000 00000000 00000000 00000000"), 1536 sizeof(outhash)); 1538 1537 } 1539 1538
Note:
See TracChangeset
for help on using the changeset viewer.