diff options
Diffstat (limited to 'sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch')
-rw-r--r-- | sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch b/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch new file mode 100644 index 000000000000..470defd33cf6 --- /dev/null +++ b/sys-apps/gptfdisk/files/gptfdisk-1.0.9-popt_segv.patch @@ -0,0 +1,22 @@ +--- a/gptcl.cc ++++ b/gptcl.cc +@@ -156,9 +156,10 @@ + + // Assume first non-option argument is the device filename.... + device = (char*) poptGetArg(poptCon); +- poptResetContext(poptCon); + + if (device != NULL) { ++ device = strdup(device); ++ poptResetContext(poptCon); + JustLooking(); // reset as necessary + BeQuiet(); // Tell called functions to be less verbose & interactive + if (LoadPartitions((string) device)) { +@@ -498,6 +499,7 @@ + cerr << "Error encountered; not saving changes.\n"; + retval = 4; + } // if ++ free(device); + } // if (device != NULL) + poptFreeContext(poptCon); + return retval; |