Fossil SCM
Fix segfault in /artifact introduced by check-in [b699040d701464ce] and reported [https://fossil-scm.org/forum/forumpost/a073f05cc3|on the forum].
Commit
5a9ac6ca3e01cc09b52ac9e8d0e7ab06dbc6c0f0f9f9b64ac1c2da826d34d4b1
Parent
4368f52961d0bc5…
1 file changed
+1
-1
+1
-1
| --- src/info.c | ||
| +++ src/info.c | ||
| @@ -2451,11 +2451,11 @@ | ||
| 2451 | 2451 | zFileName = db_text(0, |
| 2452 | 2452 | "SELECT name FROM mlink, filename" |
| 2453 | 2453 | " WHERE filename.fnid=mlink.fnid" |
| 2454 | 2454 | " AND mlink.fid=%d", |
| 2455 | 2455 | rid); |
| 2456 | - zExt = file_extension(zFileName); | |
| 2456 | + zExt = zFileName ? file_extension(zFileName) : 0; | |
| 2457 | 2457 | if( zLn ){ |
| 2458 | 2458 | output_text_with_line_numbers(z, blob_size(&content), |
| 2459 | 2459 | zFileName, zLn); |
| 2460 | 2460 | }else if( zExt && zExt[1] ){ |
| 2461 | 2461 | @ <pre> |
| 2462 | 2462 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2451,11 +2451,11 @@ | |
| 2451 | zFileName = db_text(0, |
| 2452 | "SELECT name FROM mlink, filename" |
| 2453 | " WHERE filename.fnid=mlink.fnid" |
| 2454 | " AND mlink.fid=%d", |
| 2455 | rid); |
| 2456 | zExt = file_extension(zFileName); |
| 2457 | if( zLn ){ |
| 2458 | output_text_with_line_numbers(z, blob_size(&content), |
| 2459 | zFileName, zLn); |
| 2460 | }else if( zExt && zExt[1] ){ |
| 2461 | @ <pre> |
| 2462 |
| --- src/info.c | |
| +++ src/info.c | |
| @@ -2451,11 +2451,11 @@ | |
| 2451 | zFileName = db_text(0, |
| 2452 | "SELECT name FROM mlink, filename" |
| 2453 | " WHERE filename.fnid=mlink.fnid" |
| 2454 | " AND mlink.fid=%d", |
| 2455 | rid); |
| 2456 | zExt = zFileName ? file_extension(zFileName) : 0; |
| 2457 | if( zLn ){ |
| 2458 | output_text_with_line_numbers(z, blob_size(&content), |
| 2459 | zFileName, zLn); |
| 2460 | }else if( zExt && zExt[1] ){ |
| 2461 | @ <pre> |
| 2462 |