-/* $OpenBSD: smtp_session.c,v 1.222 2015/01/06 10:31:09 gilles Exp $ */
+/* $OpenBSD: smtp_session.c,v 1.223 2015/01/07 18:28:12 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@poolp.org>
has_group = 1;
/* update insert point if not in comment and not on a whitespace */
- if (!comment && buffer[i] != ')' && !isspace((int)buffer[i]))
+ if (!comment && buffer[i] != ')' && !isspace((unsigned char)buffer[i]))
pos_component = i;
}
/* there's an address between brackets, just append domain */
if (has_bracket) {
pos_bracket--;
- while (isspace(buffer[pos_bracket]))
+ while (isspace((unsigned char)buffer[pos_bracket]))
pos_bracket--;
if (buffer[pos_bracket] == '<')
return;
pos_insert = pos_component + 1;
/* empty address */
- if (buffer[pos_component] == '\0' || isspace(buffer[pos_component]))
+ if (buffer[pos_component] == '\0' ||
+ isspace((unsigned char)buffer[pos_component]))
return;
}