diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2015-10-23 15:38:26 +0200 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2015-10-23 15:38:26 +0200 |
commit | 3e51325663806c54b16eb9aa9d3d25f10a8cdc54 (patch) | |
tree | 13dd870ee954271c34cc9b169a6e36f98c03184d /lr.c | |
parent | 915f7c161b19201b47521e1849a9c83a5a29461e (diff) | |
download | lr-3e51325663806c54b16eb9aa9d3d25f10a8cdc54.tar.gz lr-3e51325663806c54b16eb9aa9d3d25f10a8cdc54.tar.xz lr-3e51325663806c54b16eb9aa9d3d25f10a8cdc54.zip |
octal overflow
Diffstat (limited to 'lr.c')
-rw-r--r-- | lr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lr.c b/lr.c index eebf84d..2f8e0d3 100644 --- a/lr.c +++ b/lr.c @@ -215,6 +215,8 @@ parse_octal(long *r) n *= 8; n += *pos - '0'; pos++; + if (n > 07777) + parse_error("number to big"); } ws(); *r = n; @@ -383,7 +385,6 @@ parse_mode() if (parse_octal(&n)) { e->b.num = n; - printf("%d\n", n); } else { parse_error("invalid mode"); } |