MantisBT - NetSurf | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0002846 | NetSurf | [All Projects] General | public | 2022-04-04 13:13 | 2024-02-25 21:41 |
Reporter | PhilipRoman | ||||
---|---|---|---|---|---|
Assigned To | Vincent Sanders | ||||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86_64 | OS | Artix Linux | OS Version | |
Product Version | 3.10 | ||||
Target Version | 3.11 | Fixed in Version | 3.11 | ||
Fixed in CI build # | 5364 | ||||
Reported in CI build # | |||||
URL of problem page | |||||
Summary | 0002846: Division by zero when there are images in cache but total size is zero. | ||||
Description | Exactly what the title says. I discovered this while trying to use man -H without psutils installed, which produced empty images. The bug is relatively harmless and almost impossible to come across in a real-life scenario but since netsurf works with untrusted input I thought it would be a good idea to patch it. | ||||
Steps To Reproduce | run commands: touch empty.png echo '<img src="empty.png">' > test.html netsurf test.html close browser netsurf dumps core due to SIGFPE | ||||
Additional Information | Source file: content/handlers/image/image_cache.c Function: image_cache_fini op_size is zero but op_count is not: if (op_count > 0) { ... NSLOG(netsurf, INFO, "Cache total/hit/miss/fail (size) ...", ... (image_cache->hit_size * 100) / op_size, | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2022-04-04 13:13 | PhilipRoman | New Issue | |||
2022-09-11 13:23 | Vincent Sanders | Assigned To | => Vincent Sanders | ||
2022-09-11 13:23 | Vincent Sanders | Status | new => resolved | ||
2022-09-11 13:23 | Vincent Sanders | Fixed in Version | => 3.11 | ||
2022-09-11 13:23 | Vincent Sanders | Target Version | => 3.11 | ||
2022-09-11 13:23 | Vincent Sanders | Fixed in CI build # | => 5364 | ||
2022-09-11 13:23 | Vincent Sanders | Note Added: 0002406 | |||
2024-02-25 21:40 | Vincent Sanders | Note Added: 0002431 | |||
2024-02-25 21:41 | Vincent Sanders | Status | resolved => closed | ||
2024-02-25 21:41 | Vincent Sanders | Resolution | open => fixed | ||
2024-02-25 21:41 | Vincent Sanders | Note Added: 0002432 |