GChecksum assertion failed
- From: Luka Napotnik <luka napotnik gmail com>
- To: gtk-app-devel-list gnome org
- Subject: GChecksum assertion failed
- Date: Thu, 07 Aug 2008 11:08:17 +0200
Hello.
I have this small example where I create a GChecksum and apply some
data. The problem is when I request the digest, the program prints out
the following error:
(process:8422): GLib-CRITICAL **: g_checksum_get_digest: assertion
`*digest_len >= len' failed
My GChecksum code is:
------------------------------------------------------------
char data[] = "Hello, World";
int len;
GChecksum *checksum;
guint8 *b_digest;
gsize b_digest_len;
checksum = g_checksum_new(G_CHECKSUM_MD5);
len = strlen(data) + 1;
b_digest_len = len;
g_checksum_update(checksum, data, len);
g_checksum_get_digest(checksum, b_digest, &b_digest_len);
------------------------------------------------------------
I initialize the digest len with the length of data. Am I doing
something wrong? Please help.
Greets,
Luka
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]