diff options
author | Werner Koch <[email protected]> | 2015-03-20 14:39:49 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2015-03-20 14:40:09 +0000 |
commit | a0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805 (patch) | |
tree | 257f7ad8c0a7169def38fc5012859f109d8c2e30 /common/mbox-util.h | |
parent | gpg: Find keys using mail addresses with garbage after the '>' (diff) | |
download | gnupg-a0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805.tar.gz gnupg-a0eb2e4e8cef9ca6a5dfbae6440fa6cd583d0805.zip |
common: Add function is_valid_mailbox_mem.
* common/mbox-util.c (mem_count_chr): New.
(my_memstr): New.
(has_invalid_email_chars): Change args to work on a buffer.
(is_valid_mailbox_mem): New.
(is_valid_mailbox): Rewrite to use is_valid_mailbox_mem.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/mbox-util.h')
-rw-r--r-- | common/mbox-util.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/common/mbox-util.h b/common/mbox-util.h index b9a3bda6b..4dd48ecd5 100644 --- a/common/mbox-util.h +++ b/common/mbox-util.h @@ -29,8 +29,9 @@ #ifndef GNUPG_COMMON_MBOX_UTIL_H #define GNUPG_COMMON_MBOX_UTIL_H -int has_invalid_email_chars (const char *s); +int has_invalid_email_chars (const void *buffer, size_t length); int is_valid_mailbox (const char *name); +int is_valid_mailbox_mem (const void *buffer, size_t length); char *mailbox_from_userid (const char *userid); int is_valid_user_id (const char *uid); |