author | mjm <mjm> | 2003-01-05 11:18:27 (UTC) |
---|---|---|
committer | mjm <mjm> | 2003-01-05 11:18:27 (UTC) |
commit | 3eecce3109b543a5abd6a36a420fa3f53cc23023 (patch) (side-by-side diff) | |
tree | 5e92d6ec8a4ebc58822bed5de48706ed51a7ebd0 /noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc | |
parent | 4f45c61a4e778a8124ae362dd5339b329b171441 (diff) | |
download | opie-3eecce3109b543a5abd6a36a420fa3f53cc23023.zip opie-3eecce3109b543a5abd6a36a420fa3f53cc23023.tar.gz opie-3eecce3109b543a5abd6a36a420fa3f53cc23023.tar.bz2 |
general code cleanup, wrote configfileparser, ...
Diffstat (limited to 'noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc b/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc index 664ba92..67dfc02 100644 --- a/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc +++ b/noncore/net/wellenreiter/libwellenreiter/source/wl_proto.cc @@ -17,2 +17,3 @@ int add_field(char *buffer, const char *string, int len) /* 3 Byte = Length */ + memset(newlen, 0, sizeof(newlen)); snprintf(newlen, sizeof(newlen) - 1, "%.3d", len); @@ -32,2 +33,3 @@ int get_field(const char *buffer, char *out, int maxlen) /* Get length of value */ + memset(len, 0, sizeof(len)); memcpy(len, buffer, 3); @@ -36,3 +38,2 @@ int get_field(const char *buffer, char *out, int maxlen) memset(out, 0, maxlen); - if(atoi(len) > maxlen -1) @@ -55,2 +56,4 @@ int send_network_found (const char *guihost, int guiport, void *structure) + memcpy(buffer, 0, sizeof(buffer)); + /* Type = Found new net (without length field) */ |