diff options
Diffstat (limited to 'slock.c')
| -rw-r--r-- | slock.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1,4 +1,4 @@ | |||
| 1 | /* (C)opyright MMIV-MMV Anselm R. Garbe <garbeam at gmail dot com> | 1 | /* (C)opyright MMVI-MMVII Anselm R. Garbe <garbeam at gmail dot com> |
| 2 | * See LICENSE file for license details. | 2 | * See LICENSE file for license details. |
| 3 | */ | 3 | */ |
| 4 | #define _XOPEN_SOURCE 500 | 4 | #define _XOPEN_SOURCE 500 |
| @@ -122,7 +122,7 @@ main(int argc, char **argv) { | |||
| 122 | --len; | 122 | --len; |
| 123 | break; | 123 | break; |
| 124 | default: | 124 | default: |
| 125 | if(num && !iscntrl((int) buf[0])) { | 125 | if(num && !iscntrl((int) buf[0]) && (len + num < sizeof passwd)) { |
| 126 | memcpy(passwd + len, buf, num); | 126 | memcpy(passwd + len, buf, num); |
| 127 | len += num; | 127 | len += num; |
| 128 | } | 128 | } |
