You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2013/12/23 14:14:21 UTC
[Bug 55045] calls to gets() in test_find.c and test_parser.c
https://issues.apache.org/bugzilla/show_bug.cgi?id=55045
Christophe JAILLET <ch...@wanadoo.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #30361|0 |1
is patch| |
--- Comment #2 from Christophe JAILLET <ch...@wanadoo.fr> ---
Comment on attachment 30361
--> https://issues.apache.org/bugzilla/attachment.cgi?id=30361
patch to replace gets() with fgets() in test_find.c
>--- test_find.c.orig 2013-05-29 19:22:13.112875876 -0700
>+++ test_find.c 2013-05-29 19:26:27.226873980 -0700
>@@ -64,11 +64,11 @@
> p = apr_pool_alloc_init();
>
> printf("Enter field value to find items within:\n");
>- if (!gets(line))
>+ if (!fgets(line, sizeof(line), stdin))
> exit(0);
>
> printf("Enter search item:\n");
>- while (gets(tok)) {
>+ while (fgets(tok, sizeof(tok), stdin)) {
> printf(" [%s] == %s\n", tok, ap_find_list_item(p, line, tok)
> ? "Yes" : "No");
> printf("Enter search item:\n");
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org