famzah / popen-noshell

A much faster popen() and system() implementation for Linux
68 stars 13 forks source link

Double free in popen_noshell_compat call #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Call to popen_noshell_compat with an invalid command, i.e, command  which 
popen_noshell_split_command_to_argv fails.
2.
3.

Below is the fix:
Change

#define _popen_noshell_split_return_NULL { if (argv != NULL) free(argv); if 
(command != NULL) free(command); return NULL; }

to 

#define _popen_noshell_split_return_NULL { if (argv != NULL) free(argv); if 
(command != NULL) free(command); *free_this_buf = NULL; return NULL; }

Original issue reported on code.google.com by rajasekh...@gmail.com on 21 Feb 2013 at 12:09

GoogleCodeExporter commented 9 years ago
I'm really sorry for the late reply. It turned out that I wasn't getting any 
notifications for new issues here.

Fixed in r12.

Original comment by ivan.zah...@gmail.com on 24 May 2013 at 9:35