GNOME Bugzilla – Bug 510855
g_checksum_update(): Take -1 for length.
Last modified: 2008-02-28 01:48:47 UTC
This patch lets g_checksum_update() take null-terminated strings.
Created attachment 103269 [details] [review] glib_checksum_update.patch
Created attachment 103270 [details] [review] glib_checksum_update2.patch Corrected patch, without unrelated changes.
please create patches with diff -up so maintainers can review them without applying. other than that, the patch looks good to me, please apply.
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.
Reopening. The 'length' argument needs to be of type gssize, not gsize.
Similarly for g_compute_checksum_for_string(): 'length' argument needs to be of type gssize in order to accept -1.
Created attachment 105980 [details] [review] Trivial patch for 'length' parameters
Yeah, unfortunate oversight. Please commit
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.