printf("Error: read() from stdin returns 0.\n");
} else if (n < 0) {
printf("input: read, err\n");
- } else {
+ } else if (n < 1024) {
buf[n - 1] = '\0'; /* remove new line... */
printf("\n\n");
__process_input(buf, user_data);
+ } else {
+ printf("invalid input\n");
}
return TRUE;
printf("Error: read() from stdin returns 0.\n");
} else if (n < 0) {
printf("input: read, err\n");
- } else {
+ } else if (n < 1024) {
buf[n - 1] = '\0'; /* remove new line... */
printf("\n\n");
__process_input(buf, user_data);
+ } else {
+ printf("invalid input\n");
}
return TRUE;
printf("Error: read() from stdin returns 0.\n");
} else if (n < 0) {
printf("input: read, err\n");
- } else {
+ } else if (n < 1024) {
buf[n - 1] = '\0'; /* remove new line... */
printf("\n\n");
__process_input(buf, user_data);
+ } else {
+ printf("invalid input\n");
}
return TRUE;