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 510855 - g_checksum_update(): Take -1 for length.
g_checksum_update(): Take -1 for length.
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
2.15.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks: 518710
 
 
Reported: 2008-01-20 17:38 UTC by Murray Cumming
Modified: 2008-02-28 01:48 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glib_checksum_update.patch (4.45 KB, patch)
2008-01-20 17:40 UTC, Murray Cumming
none Details | Review
glib_checksum_update2.patch (1.55 KB, patch)
2008-01-20 17:41 UTC, Murray Cumming
accepted-commit_now Details | Review
Trivial patch for 'length' parameters (2.04 KB, patch)
2008-02-26 13:34 UTC, Matthew Barnes
committed Details | Review

Description Murray Cumming 2008-01-20 17:38:26 UTC
This patch lets g_checksum_update() take null-terminated strings.
Comment 1 Murray Cumming 2008-01-20 17:40:17 UTC
Created attachment 103269 [details] [review]
glib_checksum_update.patch
Comment 2 Murray Cumming 2008-01-20 17:41:44 UTC
Created attachment 103270 [details] [review]
glib_checksum_update2.patch

Corrected patch, without unrelated changes.
Comment 3 Tim Janik 2008-01-21 12:39:35 UTC
please create patches with diff -up so maintainers can review them without applying. other than that, the patch looks good to me, please apply.
Comment 4 Murray Cumming 2008-01-21 13:11:17 UTC
Sorry, yes, I wish that was easier to do with svn. I'll try to remember to use the awkward svn command that does that.
Comment 5 Matthew Barnes 2008-02-25 19:56:18 UTC
Reopening.  The 'length' argument needs to be of type gssize, not gsize.
Comment 6 Matthew Barnes 2008-02-25 20:12:39 UTC
Similarly for g_compute_checksum_for_string(): 'length' argument needs to be of type gssize in order to accept -1.
Comment 7 Matthew Barnes 2008-02-26 13:34:11 UTC
Created attachment 105980 [details] [review]
Trivial patch for 'length' parameters
Comment 8 Matthias Clasen 2008-02-27 21:04:40 UTC
Yeah, unfortunate oversight. Please commit
Comment 9 Matthew Barnes 2008-02-28 01:48:47 UTC
2008-02-27  Matthew Barnes  <mbarnes@redhat.com>

        * glib/gchecksum.[ch] (g_checksum_update),
        (g_compute_checksum_for_string): Make 'length' parameter
        signed to accomodate passing negative lengths. (#510855)

Revision 6600.