[libgxps] print-converter: fix invalid memory access
- From: Paolo Borelli <pborelli src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgxps] print-converter: fix invalid memory access
- Date: Tue, 17 Jan 2017 14:25:41 +0000 (UTC)
commit b93514d62fb5fcc657a2e890054986731d1c28b7
Author: Paolo Borelli <pborelli gnome org>
Date: Tue Jan 17 09:38:20 2017 +0100
print-converter: fix invalid memory access
"ext" is a pointer inside basename_lower, so we must free only
once we are done using it.
tools/gxps-print-converter.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/tools/gxps-print-converter.c b/tools/gxps-print-converter.c
index 7b1fd16..e99993e 100644
--- a/tools/gxps-print-converter.c
+++ b/tools/gxps-print-converter.c
@@ -109,7 +109,6 @@ gxps_converter_print_converter_begin_document (GXPSConverter *converter,
basename = g_path_get_basename (converter->input_filename);
basename_lower = g_ascii_strdown (basename, -1);
ext = g_strrstr (basename_lower, ".xps");
- g_free (basename_lower);
if (ext) {
gchar *name;
@@ -123,6 +122,7 @@ gxps_converter_print_converter_begin_document (GXPSConverter *converter,
gxps_converter_get_extension (converter));
}
+ g_free (basename_lower);
g_free (basename);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]