search for: guestfish_output

Displaying 6 results from an estimated 6 matches for "guestfish_output".

2015 Jan 20
9
[PATCH] daemon: readdir: fix invalid memory access on error
If "strdup (d->d_name)" fails with "i" > 0, then both "p" and "ret->guestfs_int_dirent_list_val" are non-null pointers, but the latter is no more valid (since "p" is the new realloc'ed buffer). Hence, trying to free both will access to invalid memory. Make sure to free only one of them, "p" if not null or
2014 Dec 04
1
[PATCH] fish: fix build warning when readline-devel is missing
...git a/fish/fish.c b/fish/fish.c index 0432774..20511f8 100644 --- a/fish/fish.c +++ b/fish/fish.c @@ -641,10 +641,12 @@ shell_script (void) #define FISH "><fs> " +#ifdef HAVE_LIBREADLINE static char *ps1 = NULL; /* GUESTFISH_PS1 */ static char *ps_output = NULL; /* GUESTFISH_OUTPUT */ -static char *ps_restore = NULL; /* GUESTFISH_RESTORE */ static char *ps_init = NULL; /* GUESTFISH_INIT */ +#endif /* HAVE_LIBREADLINE */ +static char *ps_restore = NULL; /* GUESTFISH_RESTORE */ static char *line_read = NULL; static char * @@ -698,10 +700,12 @@ script (int prompt) str...
2015 Jan 20
0
[PATCH] fish: remove extra "prompt" checks
...ts (int prompt) line_read = NULL; } - p = prompt && ps1 ? decode_ps1 (ps1) : NULL; - line_read = readline (prompt ? (ps1 ? p : FISH) : ""); + p = ps1 ? decode_ps1 (ps1) : NULL; + line_read = readline (ps1 ? p : FISH); if (ps_output) { /* GUESTFISH_OUTPUT */ CLEANUP_FREE char *po = decode_ps1 (ps_output); -- 1.9.3
2015 Jan 21
1
Re: [PATCH] fish: remove extra "prompt" checks
..._read = readline (prompt ? (ps1 ? p : FISH) : ""); > + p = ps1 ? decode_ps1 (ps1) : NULL; > + line_read = readline (ps1 ? p : FISH); Can be simplified further: line_read = readline (ps1 ? decode_ps1 (ps1) : FISH); Regards, Hu > > if (ps_output) { /* GUESTFISH_OUTPUT */ > CLEANUP_FREE char *po = decode_ps1 (ps_output); > -- > 1.9.3 > > _______________________________________________ > Libguestfs mailing list > Libguestfs@redhat.com > https://www.redhat.com/mailman/listinfo/libguestfs
2015 Nov 22
1
Re: installation error
Never mind I was missing libreadline-dev I gues this check would be good to be added with an error to the configure script since it creates error in compilation Regards, Peter > On 22 Nov 2015, at 20:06, Keresztes Péter-Zoltán <zozo@z0z0.tk> wrote: > > Hello, > > I have got into a different issue while trying to compile the latest version of libguestfs: > > CC
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
...L); @@ -1481,30 +1466,24 @@ initialize_readline (void) if (str) { free (ps1); ps1 = strdup (str); - if (!ps1) { - perror ("strdup"); - exit (EXIT_FAILURE); - } + if (!ps1) + error (EXIT_FAILURE, errno, "strdup"); } str = getenv ("GUESTFISH_OUTPUT"); if (str) { free (ps_output); ps_output = strdup (str); - if (!ps_output) { - perror ("strdup"); - exit (EXIT_FAILURE); - } + if (!ps_output) + error (EXIT_FAILURE, errno, "strdup"); } str = getenv ("GUESTFISH_INIT");...