Bug 557210 – g_compute_checksum_for_* asserts with less than 2 bytes

* glib/gchecksum.c (g_compute_checksum_for_data): Accept
        lengths < 2. Patch by Tommi Komulainen


svn path=/branches/glib-2-18/; revision=7651
This commit is contained in:
Matthias Clasen 2008-11-14 23:20:49 +00:00
parent cb717fd4db
commit 39705cc3e0
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,13 @@
2008-11-14 Matthias Clasen <mclasen@redhat.com>
Merged from trunk:
Bug 557210 g_compute_checksum_for_* asserts with less than 2
bytes
* glib/gchecksum.c (g_compute_checksum_for_data): Accept
lengths < 2. Patch by Tommi Komulainen
2008-10-31 Grahame Bowland <grahame@angrygoats.net> 2008-10-31 Grahame Bowland <grahame@angrygoats.net>
Bug 558185 'parent' variable in g_local_file_get_child_for_display_name() Bug 558185 'parent' variable in g_local_file_get_child_for_display_name()

View File

@ -1389,7 +1389,6 @@ g_compute_checksum_for_data (GChecksumType checksum_type,
g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL); g_return_val_if_fail (IS_VALID_TYPE (checksum_type), NULL);
g_return_val_if_fail (data != NULL, NULL); g_return_val_if_fail (data != NULL, NULL);
g_return_val_if_fail (length > 1, NULL);
checksum = g_checksum_new (checksum_type); checksum = g_checksum_new (checksum_type);
if (!checksum) if (!checksum)