Skip to content

Stop publishing unwritten stats fields in WebHTTrack - #2094

Merged
xroche merged 2 commits into
masterfrom
fz/B5
Nov 7, 2026
Merged

xroche merged 2 commits into
masterfrom
fz/B5

Conversation

@xroche

@xroche xroche commented Nov 7, 2026

Copy link
Copy Markdown
Owner

The WebHTTrack progress panel no longer publishes info.url_adr and info.url_fil, and four dead fields leave t_StatsBuffer. No code wrote those two fields, so strdup() read uninitialised stack on each refresh. Do not write the fields instead, because url_adr carries the login that #2000 hides from the panel.

The new test 746 passes with this change and fails on origin/master built with -ftrivial-auto-var-init=pattern, where the keys print 0xFE bytes. A default build zero-fills the stack, so the test passes on both trees there.

xroche and others added 2 commits November 7, 2026 18:32
Nothing writes url_adr or url_fil in the WebHTTrack stats rows, yet the
progress panel published both, so strdup() read uninitialised stack on
every refresh. Drop the two keys and the dead url_adr, url_fil, offset
and actived fields, which also shrinks each stats array by 56 KiB.

Do not restore the writes instead: url_adr carries the login that #2000
hides from the panel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
The positive control now counts any non-empty /trickle/ save path as a
live row, so a row still on a name such as p3.bin.4.delayed no longer
runs the loop to its deadline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Xavier Roche <roche@httrack.com>
@xroche
xroche enabled auto-merge (squash) November 7, 2026 18:52
@xroche
xroche merged commit 8dcf4d8 into master Nov 7, 2026
39 checks passed
@xroche
xroche deleted the fz/B5 branch November 7, 2026 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant