WARNING: This server is unstable and will be retired in the next days. If you want to keep this forum available, please request immediately a migration on the Nabble Support forum. Forums that don't receive any migration request will be deleted forever.

 « Return to Thread: [PATCH] Add missing check for return value from strchr()

[PATCH] The same bug on different place

by Petr Pisar-3 :: Rate this Message:

| View in Thread

---
 man/texinfo2man.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/man/texinfo2man.c b/man/texinfo2man.c
index 792210e..2ae7af7 100644
--- a/man/texinfo2man.c
+++ b/man/texinfo2man.c
@@ -550,6 +550,9 @@ int main(
                            {
                               in_table = 1;
                               q = strchr (q, '\n');
+                              if (!q) {
+                                break;
+                              }
                               ++line_no;
                               continue;
                            }
--
1.7.4.4


_______________________________________________
bug-indent mailing list
bug-indent@...
https://lists.gnu.org/mailman/listinfo/bug-indent

 « Return to Thread: [PATCH] Add missing check for return value from strchr()