httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 55045] calls to gets() in test_find.c and test_parser.c
Date Mon, 23 Dec 2013 13:14:21 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=55045

Christophe JAILLET <christophe.jaillet@wanadoo.fr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #30361|0                           |1
           is patch|                            |

--- Comment #2 from Christophe JAILLET <christophe.jaillet@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


Mime
View raw message