After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 631641 - SoupCookieJarText, delete_cookie() is broken
SoupCookieJarText, delete_cookie() is broken
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
2.32.x
Other All
: Normal normal
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2010-10-07 19:48 UTC by Michał Kazior
Modified: 2010-10-14 19:32 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Proposed patch (493 bytes, patch)
2010-10-07 19:50 UTC, Michał Kazior
none Details | Review

Description Michał Kazior 2010-10-07 19:48:53 UTC
When an expired cookie is found, all subsequent cookies in the cookie file are deleted. This is because `line` variable isn't set if a parsed cookie is NULL (an expired cookie is). Result is, the `for` repeats parse_line for an expired cookie line over and over again, until `p` reaches \0.

I attach a patch that fixes the bug.
Comment 1 Michał Kazior 2010-10-07 19:50:23 UTC
Created attachment 171921 [details] [review]
Proposed patch
Comment 2 Dan Winship 2010-10-13 21:21:53 UTC
just moving "line = p + 1;" to after the parse_cookie line should also work, right?
Comment 3 Michał Kazior 2010-10-14 05:20:25 UTC
Yes, it is as equally sufficient.
Comment 4 Dan Winship 2010-10-14 19:32:11 UTC
fixed in master (will go into 2.32.1 in a month or so)