mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
2001-05-31 Dave Peticolas <dave@krondo.com>
* src/engine/sixtp-dom-parsers.c (string_to_binary): fix sanity checks git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@4349 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
71d73df40d
commit
8593feb6ea
@ -1,5 +1,8 @@
|
|||||||
2001-05-31 Dave Peticolas <dave@krondo.com>
|
2001-05-31 Dave Peticolas <dave@krondo.com>
|
||||||
|
|
||||||
|
* src/engine/sixtp-dom-parsers.c (string_to_binary): fix sanity
|
||||||
|
checks
|
||||||
|
|
||||||
* src/test/test-dom-converters1.c (test_dom_tree_to_gnc_numeric):
|
* src/test/test-dom-converters1.c (test_dom_tree_to_gnc_numeric):
|
||||||
fix bug
|
fix bug
|
||||||
|
|
||||||
|
@ -184,6 +184,9 @@ string_to_binary(const gchar *str, void **v, guint64 *data_len)
|
|||||||
guchar *data;
|
guchar *data;
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
|
g_return_val_if_fail(v != NULL, FALSE);
|
||||||
|
g_return_val_if_fail(data_len != NULL, FALSE);
|
||||||
|
|
||||||
str_len = strlen(str);
|
str_len = strlen(str);
|
||||||
|
|
||||||
/* Since no whitespace is allowed and hex encoding is 2 text chars
|
/* Since no whitespace is allowed and hex encoding is 2 text chars
|
||||||
@ -194,8 +197,6 @@ string_to_binary(const gchar *str, void **v, guint64 *data_len)
|
|||||||
*data_len = str_len / 2;
|
*data_len = str_len / 2;
|
||||||
data = g_new0(guchar, *data_len);
|
data = g_new0(guchar, *data_len);
|
||||||
|
|
||||||
g_return_val_if_fail(*v, FALSE);
|
|
||||||
|
|
||||||
for(j = 0, i = 0; i < str_len; i += 2, j++)
|
for(j = 0, i = 0; i < str_len; i += 2, j++)
|
||||||
{
|
{
|
||||||
gchar tmpstr[3];
|
gchar tmpstr[3];
|
||||||
|
Loading…
Reference in New Issue
Block a user