aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2015-05-12 23:44:39 -0700
committerPaul Eggert2015-05-12 23:45:02 -0700
commita314016775858612d0c79e24f71b1698d6784ad6 (patch)
tree8f552d394e77a035a6a4885051043ba52f96712c /src
parent8a9ba4d67bfb3b9cf96cff2917fec1fa7a168724 (diff)
downloademacs-a314016775858612d0c79e24f71b1698d6784ad6.tar.gz
emacs-a314016775858612d0c79e24f71b1698d6784ad6.zip
* src/editfns.c (Fformat): Fix use-after-free bug (Bug#20548).
Diffstat (limited to 'src')
-rw-r--r--src/editfns.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/editfns.c b/src/editfns.c
index 1686fbf668b..cddb0d4eae6 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -4390,9 +4390,6 @@ usage: (format STRING &rest OBJECTS) */)
4390 nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf); 4390 nchars = multibyte_chars_in_text ((unsigned char *) buf, p - buf);
4391 val = make_specified_string (buf, nchars, p - buf, multibyte); 4391 val = make_specified_string (buf, nchars, p - buf, multibyte);
4392 4392
4393 /* If we allocated BUF with malloc, free it too. */
4394 SAFE_FREE ();
4395
4396 /* If the format string has text properties, or any of the string 4393 /* If the format string has text properties, or any of the string
4397 arguments has text properties, set up text properties of the 4394 arguments has text properties, set up text properties of the
4398 result string. */ 4395 result string. */
@@ -4498,6 +4495,9 @@ usage: (format STRING &rest OBJECTS) */)
4498 UNGCPRO; 4495 UNGCPRO;
4499 } 4496 }
4500 4497
4498 /* If we allocated BUF or INFO with malloc, free it too. */
4499 SAFE_FREE ();
4500
4501 return val; 4501 return val;
4502} 4502}
4503 4503