summaryrefslogtreecommitdiff
path: root/scheduler/ipp.c
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2019-01-21 16:03:08 -0500
committerMichael R Sweet <michael.r.sweet@gmail.com>2019-01-21 16:03:08 -0500
commit86c184ff348add8bb4dbb2d9f5df3054c92d0130 (patch)
tree70b2475b8582291899d824ff21ba6c9cfde4aa8d /scheduler/ipp.c
parente5dfea4c0447f57f37a07d3f49833ab051882e76 (diff)
downloadcups-86c184ff348add8bb4dbb2d9f5df3054c92d0130.tar.gz
Clean out some more _cupsStr cruft that might potentially cause an
unaligned memory access (Issue #5474) Don't directly use the string pool in the CGI programs or scheduler.
Diffstat (limited to 'scheduler/ipp.c')
-rw-r--r--scheduler/ipp.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/scheduler/ipp.c b/scheduler/ipp.c
index 819499a6f..2e3d33a51 100644
--- a/scheduler/ipp.c
+++ b/scheduler/ipp.c
@@ -2601,8 +2601,7 @@ add_printer(cupsd_client_t *con, /* I - Client connection */
if (!strcmp(attr->values[i].string.text, "none"))
continue;
- printer->reasons[printer->num_reasons] =
- _cupsStrRetain(attr->values[i].string.text);
+ printer->reasons[printer->num_reasons] = _cupsStrAlloc(attr->values[i].string.text);
printer->num_reasons ++;
if (!strcmp(attr->values[i].string.text, "paused") &&
@@ -4892,7 +4891,7 @@ copy_printer_attrs(
if ((p2_uri = ippFindAttribute(p2->attrs, "printer-uri-supported", IPP_TAG_URI)) != NULL)
{
- member_uris->values[i].string.text = _cupsStrRetain(p2_uri->values[0].string.text);
+ member_uris->values[i].string.text = _cupsStrAlloc(p2_uri->values[0].string.text);
}
else
{