From 0d08ce500e335896ee78e1476affa0f8b7e31ac4 Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Wed, 12 Jul 2017 15:25:55 -0600 Subject: [PATCH] C library: Fix an error in mkstemp() the could result in an infinite loop. --- libc/stdlib/lib_mkstemp.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libc/stdlib/lib_mkstemp.c b/libc/stdlib/lib_mkstemp.c index fdf93cdfaf4..498d424e373 100644 --- a/libc/stdlib/lib_mkstemp.c +++ b/libc/stdlib/lib_mkstemp.c @@ -284,6 +284,8 @@ int mkstemp(FAR char *path_template) return fd; } + + retries--; } /* We could not find an unique filename */