projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beb4e2c
)
smsutil: Check that udl is less than 140
author
Yang Gu
<gyagp0@gmail.com>
Wed, 26 May 2010 14:39:10 +0000
(22:39 +0800)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 27 May 2010 12:21:28 +0000
(07:21 -0500)
src/smsutil.c
patch
|
blob
|
history
diff --git
a/src/smsutil.c
b/src/smsutil.c
index
e634764
..
fa89446
100644
(file)
--- a/
src/smsutil.c
+++ b/
src/smsutil.c
@@
-1262,6
+1262,9
@@
static gboolean decode_submit(const unsigned char *pdu, int len,
if ((len - offset) < expected)
return FALSE;
+ if (expected > (int) sizeof(out->submit.ud))
+ return FALSE;
+
memcpy(out->submit.ud, pdu+offset, expected);
return TRUE;