diff options
author | Denis Kenzior <denkenz@gmail.com> | 2009-07-01 10:48:03 -0500 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-07-01 14:55:22 -0700 |
commit | 5c8f57e95e5aca9f4d3cf647edb9ec634052c6da (patch) | |
tree | fbbba863af3611b7414b4dc2cd464aa2d709d00a | |
parent | 8d8280485169135c83cfc3247c4bbf22c708b6fb (diff) | |
download | connman-5c8f57e95e5aca9f4d3cf647edb9ec634052c6da.tar.gz connman-5c8f57e95e5aca9f4d3cf647edb9ec634052c6da.tar.bz2 connman-5c8f57e95e5aca9f4d3cf647edb9ec634052c6da.zip |
Fix uninitialized use of bufpos
-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: |