Fossil SCM
Fix segmentation fault in historical_version_of_file() when file has no permissions in manifest.
Commit
8e4e30fb035f9dc9054a555ce7f4e2a17e44087f
Parent
ed2ef7e9a3b6a46…
1 file changed
+1
-1
+1
-1
| --- src/update.c | ||
| +++ src/update.c | ||
| @@ -499,11 +499,11 @@ | ||
| 499 | 499 | manifest_file_rewind(pManifest); |
| 500 | 500 | while( (pFile = manifest_file_next(pManifest,0))!=0 ){ |
| 501 | 501 | if( fossil_strcmp(pFile->zName, file)==0 ){ |
| 502 | 502 | rid = uuid_to_rid(pFile->zUuid, 0); |
| 503 | 503 | manifest_destroy(pManifest); |
| 504 | - if( isLink!=NULL ){ | |
| 504 | + if( isLink!=NULL && pFile->zPerm != 0){ | |
| 505 | 505 | *isLink = strstr(pFile->zPerm, "l") ? 1 : 0; |
| 506 | 506 | } |
| 507 | 507 | return content_get(rid, content); |
| 508 | 508 | } |
| 509 | 509 | } |
| 510 | 510 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -499,11 +499,11 @@ | |
| 499 | manifest_file_rewind(pManifest); |
| 500 | while( (pFile = manifest_file_next(pManifest,0))!=0 ){ |
| 501 | if( fossil_strcmp(pFile->zName, file)==0 ){ |
| 502 | rid = uuid_to_rid(pFile->zUuid, 0); |
| 503 | manifest_destroy(pManifest); |
| 504 | if( isLink!=NULL ){ |
| 505 | *isLink = strstr(pFile->zPerm, "l") ? 1 : 0; |
| 506 | } |
| 507 | return content_get(rid, content); |
| 508 | } |
| 509 | } |
| 510 |
| --- src/update.c | |
| +++ src/update.c | |
| @@ -499,11 +499,11 @@ | |
| 499 | manifest_file_rewind(pManifest); |
| 500 | while( (pFile = manifest_file_next(pManifest,0))!=0 ){ |
| 501 | if( fossil_strcmp(pFile->zName, file)==0 ){ |
| 502 | rid = uuid_to_rid(pFile->zUuid, 0); |
| 503 | manifest_destroy(pManifest); |
| 504 | if( isLink!=NULL && pFile->zPerm != 0){ |
| 505 | *isLink = strstr(pFile->zPerm, "l") ? 1 : 0; |
| 506 | } |
| 507 | return content_get(rid, content); |
| 508 | } |
| 509 | } |
| 510 |