mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
Make sure that only ascii is passed to isfoo functions.
This commit is contained in:
parent
a72b1e0a57
commit
6a00a17bd1
15 changed files with 66 additions and 31 deletions
|
@ -2876,13 +2876,13 @@ add_notation_data( const char *string, int which )
|
|||
/* we only support printable text - therefore we enforce the use
|
||||
* of only printable characters (an empty value is valid) */
|
||||
for( s++; *s ; s++ ) {
|
||||
if( iscntrl(*s) ) {
|
||||
if ((*s & 0x80))
|
||||
highbit = 1;
|
||||
else if (iscntrl(*s)) {
|
||||
log_error(_("a notation value must not use "
|
||||
"any control characters\n") );
|
||||
return;
|
||||
}
|
||||
else if( *s & 0x80 )
|
||||
highbit = 1;
|
||||
}
|
||||
|
||||
if( highbit ) /* must use UTF8 encoding */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue