diff options
| author | Simon Josefsson <simon@josefsson.org> | 2016-01-14 14:59:19 +0100 |
|---|---|---|
| committer | Simon Josefsson <simon@josefsson.org> | 2016-01-14 14:59:19 +0100 |
| commit | 5e3cb9c7b5bf0ce665b9d68f5ddf095af5c9ba60 (patch) | |
| tree | 5853b0daa6dd47caada30ed63bfc6ae741ea6a1c | |
| parent | c563c947a4982a8b073143e02e8cf777f87e38a3 (diff) | |
| download | libidn-5e3cb9c7b5bf0ce665b9d68f5ddf095af5c9ba60.tar.gz | |
Really fix bug when reading \00 inputs.
| -rw-r--r-- | src/idn.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -200,8 +200,9 @@ main (int argc, char *argv[]) error (EXIT_FAILURE, errno, _("input error")); } - if (line[strlen (line) - 1] == '\n') - line[strlen (line) - 1] = '\0'; + if (strlen (line) > 0) + if (line[strlen (line) - 1] == '\n') + line[strlen (line) - 1] = '\0'; if (args_info.stringprep_given) { |
