diff options
-rw-r--r-- | common/tlv.c | 4 | ||||
-rw-r--r-- | tools/gpgtar-create.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/common/tlv.c b/common/tlv.c index 6813c585a..0058b67ca 100644 --- a/common/tlv.c +++ b/common/tlv.c @@ -214,9 +214,9 @@ parse_ber_header (unsigned char const **buffer, size_t *size, else { unsigned long len = 0; - int count = c & 0x7f; + int count = (c & 0x7f); - if (count > sizeof (len) || count > sizeof (size_t)) + if (count > (sizeof(len)<sizeof(size_t)?sizeof(len):sizeof(size_t))) return gpg_err_make (default_errsource, GPG_ERR_BAD_BER); for (; count; count--) diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c index ef906a5dd..ffd239f42 100644 --- a/tools/gpgtar-create.c +++ b/tools/gpgtar-create.c @@ -429,7 +429,11 @@ pattern_valid_p (const char *pattern) return 0; if (*pattern == '.' && pattern[1] == '.') return 0; - if (*pattern == '/' || *pattern == DIRSEP_C) + if (*pattern == '/' +#ifdef HAVE_DOSISH_SYSTEM + || *pattern == '\\' +#endif + ) return 0; /* Absolute filenames are not supported. */ #ifdef HAVE_DRIVE_LETTERS if (((*pattern >= 'a' && *pattern <= 'z') |