projects
/
silc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merged silc_1_1_branch to trunk.
[silc.git]
/
lib
/
silccore
/
silcargument.c
diff --git
a/lib/silccore/silcargument.c
b/lib/silccore/silcargument.c
index a98726f86e492d64366f2c05b0ae4ceb944b8722..eac8bdf60e72d5dfef128924ba389df5fbee842f 100644
(file)
--- a/
lib/silccore/silcargument.c
+++ b/
lib/silccore/silcargument.c
@@
-4,7
+4,7
@@
Author: Pekka Riikonen <priikone@silcnet.org>
Author: Pekka Riikonen <priikone@silcnet.org>
- Copyright (C) 2001 - 200
6
Pekka Riikonen
+ Copyright (C) 2001 - 200
7
Pekka Riikonen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-67,8
+67,10
@@
SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
SILC_STR_UI_SHORT(&p_len),
SILC_STR_UI_CHAR(&arg_type),
SILC_STR_END);
SILC_STR_UI_SHORT(&p_len),
SILC_STR_UI_CHAR(&arg_type),
SILC_STR_END);
- if (ret == -1 || p_len > silc_buffer_len(&buffer) - 3)
+ if (ret == -1 || p_len > silc_buffer_len(&buffer) - 3) {
+ SILC_LOG_DEBUG(("Malformed argument payload"));
goto err;
goto err;
+ }
newp->argv_lens[i] = p_len;
newp->argv_types[i] = arg_type;
newp->argv_lens[i] = p_len;
newp->argv_types[i] = arg_type;
@@
-79,8
+81,10
@@
SilcArgumentPayload silc_argument_payload_parse(const unsigned char *payload,
SILC_STR_UI_XNSTRING_ALLOC(&newp->argv[i],
p_len),
SILC_STR_END);
SILC_STR_UI_XNSTRING_ALLOC(&newp->argv[i],
p_len),
SILC_STR_END);
- if (ret == -1)
+ if (ret == -1) {
+ SILC_LOG_DEBUG(("Malformed argument payload"));
goto err;
goto err;
+ }
silc_buffer_pull(&buffer, p_len);
pull_len += 3 + p_len;
silc_buffer_pull(&buffer, p_len);
pull_len += 3 + p_len;