projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ae25c47
)
(try to) fix buffer overflow in test
author
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 29 Sep 2013 13:25:48 +0000
(15:25 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 29 Sep 2013 13:25:48 +0000
(15:25 +0200)
tests/run/cpp_nonstdint.h
patch
|
blob
|
history
diff --git
a/tests/run/cpp_nonstdint.h
b/tests/run/cpp_nonstdint.h
index
6155ab8
..
63c9779
100644
(file)
--- a/
tests/run/cpp_nonstdint.h
+++ b/
tests/run/cpp_nonstdint.h
@@
-107,11
+107,15
@@
class Integral {
dst_offset = 0;
src_offset = 0;
msb = ((unsigned char*) src)[src_len - 1];
+ if (src_len > dst_len) {
+ src_len = dst_len;
+ }
} else {
if (dst_len > src_len) {
dst_offset = dst_len - src_len;
} else {
src_offset = src_len - dst_len;
+ src_len = dst_len;
}
msb = ((unsigned char*) src)[0];
}