static int
contains_non_ascii(char *str)
{
- char *cp;
+ unsigned char *cp;
for (cp = str; *cp; cp++) {
- if (*cp > 127 || *cp < 0) {
+ if (*cp > 127) {
return 1;
}
}
}
/* We'll grow the buffer as needed. */
- field = (char *)mh_xmalloc(field_size = 256);
+ field = (char *)mh_xcalloc(field_size = 256, sizeof(char));
/*
** Scan the draft file for an attachment header field name.
}
/* We'll grow the buffer as needed. */
- field = (char *)mh_xmalloc(field_size = 256);
+ field = (char *)mh_xcalloc(field_size = 256, sizeof(char));
/* Scan the draft file for an attachment header field name. */
while (get_line() != EOF && *field != '\0' && *field != '-') {