File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ static void strcat_alloc(char **dst, const char *s)
150150 {
151151 size_t __len = strlen (s );
152152 if (__len != 0 )
153- src = strldup (s , __len );
153+ src = strldup (s , __len + 1 );
154154 else
155155 src = NULL ;
156156 }
@@ -239,7 +239,7 @@ static char *get_tmpdir_alloc(const char *override_dir)
239239 {
240240 size_t _len = strlen (src );
241241 if (_len != 0 )
242- path = strldup (src , _len );
242+ path = strldup (src , _len + 1 );
243243 }
244244 else
245245 path = (char * )calloc (1 ,1 );
@@ -264,7 +264,7 @@ static bool write_file_with_random_name(char **temp_dll_path,
264264 {
265265 size_t _len = strlen (src );
266266 if (_len != 0 )
267- ext = strldup (src , _len );
267+ ext = strldup (src , _len + 1 );
268268 }
269269 else
270270 ext = (char * )calloc (1 ,1 );
You can’t perform that action at this time.
0 commit comments