diff options
| author | David M. Syzdek <david@syzdek.net> | 2022-09-12 22:54:28 -0800 |
|---|---|---|
| committer | David M. Syzdek <david@syzdek.net> | 2022-09-12 22:54:28 -0800 |
| commit | ef48173562b14a80dbb29d942c7ed4619af8de1f (patch) | |
| tree | ee34e439033552c0ca26554a6d28d9157f5685d7 | |
| parent | fe23e5dcb993f08ed410c5bb57b0e0af3222f3f9 (diff) | |
| download | bindletools-ef48173562b14a80dbb29d942c7ed4619af8de1f.tar.gz bindletools-ef48173562b14a80dbb29d942c7ed4619af8de1f.tar.bz2 bindletools-ef48173562b14a80dbb29d942c7ed4619af8de1f.tar.xz bindletools-ef48173562b14a80dbb29d942c7ed4619af8de1f.zip | |
libbindle: adding error code to bindle_pctenc_decode()
| -rw-r--r-- | lib/libbindle/lencoding.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libbindle/lencoding.c b/lib/libbindle/lencoding.c index 8978f61..b3a7a4a 100644 --- a/lib/libbindle/lencoding.c +++ b/lib/libbindle/lencoding.c | |||
| @@ -982,7 +982,10 @@ bindle_pctenc_decode( | |||
| 982 | 982 | ||
| 983 | // verifies encoded data contains only valid characters | 983 | // verifies encoded data contains only valid characters |
| 984 | if ((rc = bindle_pctenc_verify((const char *)src, n)) == -1) | 984 | if ((rc = bindle_pctenc_verify((const char *)src, n)) == -1) |
| 985 | { | ||
| 986 | errno = EBADMSG; | ||
| 985 | return(-1); | 987 | return(-1); |
| 988 | }; | ||
| 986 | if ( (rc >= ((ssize_t)s-1)) && ((dst)) ) | 989 | if ( (rc >= ((ssize_t)s-1)) && ((dst)) ) |
| 987 | { | 990 | { |
| 988 | errno = ENOBUFS; | 991 | errno = ENOBUFS; |
