- Timestamp:
- Jan 9, 2008, 10:49:15 PM (17 years ago)
- Location:
- trunk/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/cutest_sh_tiger0.c
r137 r151 135 135 char * expected; 136 136 char hashbuf[KEYBUF_SIZE]; 137 UINT64 length; 137 138 138 139 init(); … … 153 154 /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 154 155 */ 155 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 156 length = TIGER_NOLIM; 157 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 156 158 expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095"; 157 159 CuAssertStrEquals(tc, expected, actual); … … 160 162 CuAssertTrue(tc, rval_open >= 0); 161 163 162 actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 164 length = TIGER_NOLIM; 165 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 163 166 expected = "0E9321614C966A33608C2A15F156E0435CACFD1213B9F095"; 164 167 CuAssertStrEquals(tc, expected, actual); … … 175 178 /* same result as GNU md5sum 176 179 */ 177 actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 180 length = TIGER_NOLIM; 181 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 178 182 expected = "AEEC4DDA496BCFBA691F4E8863BA84C00000000000000000"; 179 183 CuAssertStrEquals(tc, expected, actual); … … 190 194 /* same result as gpg --print-md SHA1 191 195 */ 192 actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 196 length = TIGER_NOLIM; 197 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 193 198 expected = "2FE65D1D995B8F8BC8B13F798C07E7E935A787ED00000000"; 194 199 CuAssertStrEquals(tc, expected, actual); … … 216 221 /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 217 222 */ 218 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 223 length = TIGER_NOLIM; 224 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 219 225 expected = "F987845A0EA784367BF9E4DB09014995810F27C99C891734"; 220 226 CuAssertStrEquals(tc, expected, actual); … … 239 245 /* same result as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 240 246 */ 241 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 247 length = TIGER_NOLIM; 248 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 242 249 expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8"; 243 250 CuAssertStrEquals(tc, expected, actual); … … 258 265 char * expected; 259 266 char hashbuf[KEYBUF_SIZE]; 267 UINT64 length; 260 268 261 269 char * teststring = "Tiger - A Fast New Hash Function, by Ross Anderson and Eli Biham, proceedings of Fast Software Encryption 3, Cambridge, 1996.\n"; 262 int testlen = strlen(teststring);270 size_t testlen = strlen(teststring); 263 271 264 272 init(); … … 280 288 /* same as GnuPG 1.0.6 (gpg --load-extension tiger --print-md TIGER192) 281 289 */ 282 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 0, 0, hashbuf, sizeof(hashbuf)); 290 length = 0; 291 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 283 292 expected = "24F0130C63AC933216166E76B1BB925FF373DE2D49584E7A"; 284 293 CuAssertStrEquals(tc, expected, actual); 285 286 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, testlen, 0, hashbuf, sizeof(hashbuf)); 294 CuAssertTrue(tc, 0 == length); 295 296 length = testlen; 297 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 287 298 expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8"; 288 299 CuAssertStrEquals(tc, expected, actual); 289 290 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 2*testlen, 0, hashbuf, sizeof(hashbuf)); 300 CuAssertTrue(tc, testlen == length); 301 302 length = 2*testlen; 303 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 291 304 expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90"; 292 305 CuAssertStrEquals(tc, expected, actual); 293 294 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 306 CuAssertTrue(tc, 2*testlen == length); 307 308 length = TIGER_NOLIM; 309 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 295 310 expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90"; 296 311 CuAssertStrEquals(tc, expected, actual); 312 CuAssertTrue(tc, 2*testlen == length); 297 313 298 314 fp = fopen("cutest_foo", "a"); … … 303 319 CuAssertTrue(tc, result == 0); 304 320 305 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, testlen, 0, hashbuf, sizeof(hashbuf)); 321 length = testlen; 322 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 306 323 expected = "75B98A7AE257A230189828A40792E30B4038D286479CC7B8"; 307 324 CuAssertStrEquals(tc, expected, actual); 308 309 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 2*testlen, 0, hashbuf, sizeof(hashbuf)); 325 CuAssertTrue(tc, testlen == length); 326 327 length = 2*testlen; 328 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 310 329 expected = "B5B4FB97B01ADB58794D87A6A01B2368852FA764BD93AB90"; 311 330 CuAssertStrEquals(tc, expected, actual); 312 313 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 3*testlen, 0, hashbuf, sizeof(hashbuf)); 331 CuAssertTrue(tc, 2*testlen == length); 332 333 length = 3*testlen; 334 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 314 335 expected = "D0EE1A9956CAB22D84B51A5E0C093B724828C6A1F9CBDB7F"; 315 336 CuAssertStrEquals(tc, expected, actual); 316 317 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 337 CuAssertTrue(tc, 3*testlen == length); 338 339 length = TIGER_NOLIM; 340 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 318 341 expected = "D0EE1A9956CAB22D84B51A5E0C093B724828C6A1F9CBDB7F"; 319 342 CuAssertStrEquals(tc, expected, actual); 320 321 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, 5, 0, hashbuf, sizeof(hashbuf)); 343 CuAssertTrue(tc, 3*testlen == length); 344 345 length = 5; 346 actual = sh_tiger_generic_hash("cutest_foo", TIGER_FILE, &length, 0, hashbuf, sizeof(hashbuf)); 322 347 expected = "9F00F599072300DD276ABB38C8EB6DEC37790C116F9D2BDF"; 323 348 CuAssertStrEquals(tc, expected, actual); 349 CuAssertTrue(tc, 5 == length); 324 350 325 351 /* same results as GNU md5sum */ … … 331 357 CuAssertTrue(tc, rval_open >= 0); 332 358 333 actual = sh_tiger_generic_hash("cutest_foo", rval_open, testlen, 0, hashbuf, sizeof(hashbuf)); 359 length = testlen; 360 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 334 361 expected = "11E7E7EA486136273606BEE57C71F34B0000000000000000"; 335 362 CuAssertStrEquals(tc, expected, actual); 336 337 result = sl_rewind(rval_open); 338 CuAssertTrue(tc, rval_open >= 0); 339 340 actual = sh_tiger_generic_hash("cutest_foo", rval_open, 2*testlen, 0, hashbuf, sizeof(hashbuf)); 363 CuAssertTrue(tc, testlen == length); 364 365 result = sl_rewind(rval_open); 366 CuAssertTrue(tc, rval_open >= 0); 367 368 length = 2*testlen; 369 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 341 370 expected = "D49DAD474095D467E2E5EFCB2DC23A770000000000000000"; 342 371 CuAssertStrEquals(tc, expected, actual); 343 344 result = sl_rewind(rval_open); 345 CuAssertTrue(tc, rval_open >= 0); 346 347 actual = sh_tiger_generic_hash("cutest_foo", rval_open, 3*testlen, 0, hashbuf, sizeof(hashbuf)); 372 CuAssertTrue(tc, 2*testlen == length); 373 374 result = sl_rewind(rval_open); 375 CuAssertTrue(tc, rval_open >= 0); 376 377 length = 3*testlen; 378 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 348 379 expected = "00A1F1C5EDDCCFC430D3862FDA94593E0000000000000000"; 349 380 CuAssertStrEquals(tc, expected, actual); 350 351 result = sl_rewind(rval_open); 352 CuAssertTrue(tc, rval_open >= 0); 353 354 actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 381 CuAssertTrue(tc, 3*testlen == length); 382 383 result = sl_rewind(rval_open); 384 CuAssertTrue(tc, rval_open >= 0); 385 386 length = TIGER_NOLIM; 387 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 355 388 expected = "00A1F1C5EDDCCFC430D3862FDA94593E0000000000000000"; 356 389 CuAssertStrEquals(tc, expected, actual); 390 CuAssertTrue(tc, 3*testlen == length); 357 391 358 392 /* same result as gpg --print-md SHA1 … … 365 399 CuAssertTrue(tc, rval_open >= 0); 366 400 367 actual = sh_tiger_generic_hash("cutest_foo", rval_open, testlen, 0, hashbuf, sizeof(hashbuf)); 401 length = testlen; 402 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 368 403 expected = "F37DB4344CCD140EE315179E9A27512FB4704F0F00000000"; 369 404 CuAssertStrEquals(tc, expected, actual); 370 371 result = sl_rewind(rval_open); 372 CuAssertTrue(tc, rval_open >= 0); 373 374 actual = sh_tiger_generic_hash("cutest_foo", rval_open, 2*testlen, 0, hashbuf, sizeof(hashbuf)); 405 CuAssertTrue(tc, testlen == length); 406 407 result = sl_rewind(rval_open); 408 CuAssertTrue(tc, rval_open >= 0); 409 410 length = 2*testlen; 411 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 375 412 expected = "D2AD5FC366452D81400BAC31F96269DEEF314BC200000000"; 376 413 CuAssertStrEquals(tc, expected, actual); 377 378 result = sl_rewind(rval_open); 379 CuAssertTrue(tc, rval_open >= 0); 380 381 actual = sh_tiger_generic_hash("cutest_foo", rval_open, 3*testlen, 0, hashbuf, sizeof(hashbuf)); 414 CuAssertTrue(tc, 2*testlen == length); 415 416 result = sl_rewind(rval_open); 417 CuAssertTrue(tc, rval_open >= 0); 418 419 length = 3*testlen; 420 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 382 421 expected = "FAA937EF3389C7E786EB0F1006D049D7AEA7B7B600000000"; 383 422 CuAssertStrEquals(tc, expected, actual); 384 385 result = sl_rewind(rval_open); 386 CuAssertTrue(tc, rval_open >= 0); 387 388 actual = sh_tiger_generic_hash("cutest_foo", rval_open, TIGER_NOLIM, 0, hashbuf, sizeof(hashbuf)); 423 CuAssertTrue(tc, 3*testlen == length); 424 425 result = sl_rewind(rval_open); 426 CuAssertTrue(tc, rval_open >= 0); 427 428 length = TIGER_NOLIM; 429 actual = sh_tiger_generic_hash("cutest_foo", rval_open, &length, 0, hashbuf, sizeof(hashbuf)); 389 430 expected = "FAA937EF3389C7E786EB0F1006D049D7AEA7B7B600000000"; 390 431 CuAssertStrEquals(tc, expected, actual); 432 CuAssertTrue(tc, 3*testlen == length); 391 433 392 434 result = sl_close(rval_open); -
trunk/src/sh_prelink.c
r133 r151 261 261 { 262 262 char hashbuf[KEYBUF_SIZE]; 263 UINT64 length_nolim = TIGER_NOLIM; 263 264 sl_strlcpy(file_hash, 264 sh_tiger_generic_hash (path, task.pipeTI, TIGER_NOLIM, alert_timeout,265 sh_tiger_generic_hash (path, task.pipeTI, &length_nolim, alert_timeout, 265 266 hashbuf, sizeof(hashbuf)), 266 267 KEY_LEN+1); -
trunk/src/sh_tiger0.c
r137 r151 106 106 static 107 107 word64 * sh_tiger_hash_val (const char * filename, TigerType what, 108 UINT64 Length, int timeout, word64 * res)108 UINT64 * Length, int timeout, word64 * res) 109 109 #else 110 110 static 111 111 sh_word32 * sh_tiger_hash_val (const char * filename, TigerType what, 112 UINT64 Length, int timeout, sh_word32 * res)112 UINT64 * Length, int timeout, sh_word32 * res) 113 113 #endif 114 114 { … … 178 178 SH_FREE(tmp); 179 179 SH_FREE(buffer); 180 *Length = 0; 180 181 SL_RETURN( NULL, _("sh_tiger_hash_val")); 181 182 } … … 222 223 sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte)); 223 224 SH_FREE(buffer); 225 *Length = 0; 224 226 SL_RETURN( NULL, _("sh_tiger_hash_val")); 225 227 } … … 242 244 sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte)); 243 245 SH_FREE(buffer); 246 *Length = 0; 244 247 SL_RETURN( NULL, _("sh_tiger_hash_val")); 245 248 } 246 249 247 if (Length != TIGER_NOLIM) 250 bcount += count; 251 252 if (*Length != TIGER_NOLIM) 248 253 { 249 bcount += count; 250 if (bcount > Length) 251 count = count - (bcount - Length); 252 count = (count < 0) ? 0 : count; 254 if (bcount > *Length) 255 { 256 count = count - (bcount - (*Length)); 257 bcount = *Length; 258 count = (count < 0) ? 0 : count; 259 } 253 260 } 254 261 … … 288 295 sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte)); 289 296 SH_FREE(buffer); 297 *Length = 0; 290 298 SL_RETURN( NULL, _("sh_tiger_hash_val")); 291 299 } … … 375 383 sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte)); 376 384 SH_FREE(buffer); 385 *Length = bcount; 377 386 SL_RETURN( res, _("sh_tiger_hash_val")); 378 387 } … … 380 389 if (what == TIGER_DATA && filename != NULL) 381 390 { 382 tiger(TIGER_CAST filename, (sh_word32) Length, res);391 tiger(TIGER_CAST filename, (sh_word32) *Length, res); 383 392 sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte)); 384 393 SH_FREE(buffer); … … 387 396 sh_unix_munlock((char *)buffer, (PRIV_MAX)*sizeof(sh_byte)); 388 397 SH_FREE(buffer); 398 *Length = 0; 389 399 SL_RETURN( NULL, _("sh_tiger_hash_val")); 390 400 } … … 822 832 beginning at RESBLOCK. */ 823 833 static int md5_stream(char * filename, void *resblock, 824 UINT64 Length, int timeout, SL_TICKET fd)834 UINT64 * Length, int timeout, SL_TICKET fd) 825 835 { 826 836 /* Important: BLOCKSIZE must be a multiple of 64. */ … … 852 862 MSG_E_ACCESS, (long) euid, tmp); 853 863 SH_FREE(tmp); 864 *Length = 0; 854 865 return -1; 855 866 } … … 888 899 MSG_E_READ, tmp); 889 900 SH_FREE(tmp); 901 *Length = 0; 890 902 return -1; 891 903 } 892 904 893 if (Length != TIGER_NOLIM) 905 bcount += n; 906 907 if (*Length != TIGER_NOLIM) 894 908 { 895 bcount += n; 896 if (bcount > Length) 897 n = n - (bcount - Length); 898 n = (n < 0) ? 0 : n; 909 if (bcount > *Length) 910 { 911 n = n - (bcount - (*Length)); 912 bcount = *Length; 913 n = (n < 0) ? 0 : n; 914 } 899 915 } 900 916 … … 924 940 if (sig_termfast == 1) 925 941 { 942 *Length = 0; 926 943 return -1; 927 944 } … … 939 956 (void) md5Digest(&ctx, resblock); 940 957 958 *Length = bcount; 941 959 return 0; 942 960 } … … 944 962 static 945 963 char * sh_tiger_md5_hash (char * filename, TigerType what, 946 UINT64 Length, int timeout, char * out, size_t len)964 UINT64 * Length, int timeout, char * out, size_t len) 947 965 { 948 966 int cnt; … … 1332 1350 beginning at RESBLOCK. */ 1333 1351 static int sha1_stream(char * filename, void *resblock, 1334 UINT64 Length, int timeout, SL_TICKET fd)1352 UINT64 * Length, int timeout, SL_TICKET fd) 1335 1353 { 1336 1354 /* Important: BLOCKSIZE must be a multiple of 64. */ … … 1361 1379 MSG_E_ACCESS, (long) euid, tmp); 1362 1380 SH_FREE(tmp); 1381 *Length = 0; 1363 1382 return -1; 1364 1383 } … … 1400 1419 } 1401 1420 SH_FREE(tmp); 1421 *Length = 0; 1402 1422 return -1; 1403 1423 } 1404 1424 1405 if (Length != TIGER_NOLIM) 1425 bcount += n; 1426 1427 if (*Length != TIGER_NOLIM) 1406 1428 { 1407 bcount += n; 1408 if (bcount > Length) 1409 n = n - (bcount - Length); 1410 n = (n < 0) ? 0 : n; 1429 if (bcount > *Length) 1430 { 1431 n = n - (bcount - (*Length)); 1432 bcount = *Length; 1433 n = (n < 0) ? 0 : n; 1434 } 1411 1435 } 1412 1436 … … 1436 1460 if (sig_termfast == 1) 1437 1461 { 1462 *Length = 0; 1438 1463 return -1; 1439 1464 } … … 1453 1478 /* Construct result in desired memory. */ 1454 1479 sha_digest (&ctx, resblock); 1480 *Length = bcount; 1455 1481 return 0; 1456 1482 } … … 1458 1484 1459 1485 static char * sh_tiger_sha1_hash (char * filename, TigerType what, 1460 UINT64 Length, int timeout,1486 UINT64 * Length, int timeout, 1461 1487 char * out, size_t len) 1462 1488 { … … 1517 1543 1518 1544 static char * sh_tiger_hash_internal (const char * filename, TigerType what, 1519 UINT64 Length, int timeout,1545 UINT64 * Length, int timeout, 1520 1546 char * out, size_t len); 1521 1547 … … 1523 1549 UINT64 Length, char * out, size_t len) 1524 1550 { 1525 return sh_tiger_hash_internal (filename, what, Length, 0, out,len); 1551 UINT64 local_length = Length; 1552 char * retval = sh_tiger_hash_internal (filename, what, &local_length, 0, out,len); 1553 return retval; 1526 1554 } 1527 1555 1528 1556 char * sh_tiger_generic_hash (char * filename, TigerType what, 1529 UINT64 Length, int timeout,1557 UINT64 * Length, int timeout, 1530 1558 char * out, size_t len) 1531 1559 { … … 1545 1573 1546 1574 static char * sh_tiger_hash_internal (const char * filename, TigerType what, 1547 UINT64 Length, int timeout,1575 UINT64 * Length, int timeout, 1548 1576 char * out, size_t len) 1549 1577 { … … 1598 1626 sh_word32 res[6]; 1599 1627 #endif 1628 UINT64 local_length = Length; 1600 1629 1601 1630 SL_ENTER(_("sh_tiger_hash_gpg")); 1602 1631 1603 if (NULL != sh_tiger_hash_val (filename, what, Length, 0, res))1632 if (NULL != sh_tiger_hash_val (filename, what, &local_length, 0, res)) 1604 1633 { 1605 1634 #if defined(TIGER_64_BIT) … … 1663 1692 sh_word32 res[6]; 1664 1693 #endif 1694 UINT64 local_length = Length; 1665 1695 1666 1696 SL_ENTER(_("sh_tiger_hash_uint32")); … … 1671 1701 out[3] = 0; out[4] = 0; out[5] = 0; 1672 1702 1673 if (NULL != sh_tiger_hash_val (filename, what, Length, 0, res))1703 if (NULL != sh_tiger_hash_val (filename, what, &local_length, 0, res)) 1674 1704 { 1675 1705 #if defined(TIGER_64_BIT) -
trunk/src/sh_unix.c
r149 r151 3033 3033 char hashbuf[KEYBUF_SIZE]; 3034 3034 sl_strlcpy(fileHash, 3035 sh_tiger_generic_hash (filename, fd, tmpFile.size,3035 sh_tiger_generic_hash (filename, fd, &(tmpFile.size), 3036 3036 alert_timeout, hashbuf, sizeof(hashbuf)), 3037 3037 KEY_LEN+1); … … 3371 3371 { 3372 3372 char hashbuf[KEYBUF_SIZE]; 3373 UINT64 length_nolim = TIGER_NOLIM; 3373 3374 sl_strlcpy(fileHash, 3374 3375 sh_tiger_generic_hash (theFile->fullpath, 3375 rval_open, TIGER_NOLIM,3376 rval_open, &length_nolim, 3376 3377 alert_timeout, 3377 3378 hashbuf, sizeof(hashbuf)), … … 3379 3380 if ((theFile->check_mask & MODI_SGROW) != 0) 3380 3381 { 3382 fbuf.st_size = (off_t) length_nolim; 3383 buf.st_size = fbuf.st_size; 3381 3384 sl_rewind(rval_open); 3382 3385 sh_unix_checksum_size (theFile->fullpath, &fbuf, … … 3411 3414 { 3412 3415 char hashbuf[KEYBUF_SIZE]; 3416 UINT64 length_nolim = TIGER_NOLIM; 3413 3417 sl_strlcpy(fileHash, 3414 3418 sh_tiger_generic_hash (theFile->fullpath, rval_open, 3415 TIGER_NOLIM,3419 &length_nolim, 3416 3420 alert_timeout, 3417 3421 hashbuf, sizeof(hashbuf)), … … 3419 3423 if ((theFile->check_mask & MODI_SGROW) != 0) 3420 3424 { 3425 fbuf.st_size = (off_t) length_nolim; 3426 buf.st_size = fbuf.st_size; 3421 3427 sl_rewind(rval_open); 3422 3428 sh_unix_checksum_size (theFile->fullpath, &fbuf,
Note:
See TracChangeset
for help on using the changeset viewer.