diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-07-01 10:48:03 -0500 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2009-07-01 10:48:51 -0500 |
commit | 595407f65bfffbdfb1e9907068ea8079151a6cf7 (patch) | |
tree | d3c010eaf0e3379e18dbe9582c5830b0d4ec57a3 /gatchat/gatresult.c | |
parent | 56863f7f509775f1fef4c5a5e09f563bdb152e12 (diff) |
Fix uninitialized use of bufpos
Diffstat (limited to 'gatchat/gatresult.c')
-rw-r--r-- | gatchat/gatresult.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gatchat/gatresult.c b/gatchat/gatresult.c index 7a983083..9c382d91 100644 --- a/gatchat/gatresult.c +++ b/gatchat/gatresult.c @@ -174,6 +174,7 @@ gboolean g_at_result_iter_next_hexstring(GAtResultIter *iter, len = strlen(line); pos = iter->line_pos; + bufpos = iter->buf + pos; /* Omitted string */ if (line[pos] == ',') { @@ -192,7 +193,7 @@ gboolean g_at_result_iter_next_hexstring(GAtResultIter *iter, *length = (end - pos) / 2; - for (bufpos = iter->buf + pos; pos < end; pos += 2) + for (; pos < end; pos += 2) sscanf(line + pos, "%02hhx", bufpos++); out: |