summaryrefslogtreecommitdiff
path: root/scheduler/main.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2015-06-08 18:32:35 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2015-06-08 18:32:35 +0000
commit5e6c3df7c0d322aa83a6c7bf94ab63a3f479a938 (patch)
treeb6f610973012651cf7d9c521c879e3d7267ca0ac /scheduler/main.c
parentc59e07c6742e25ef7111714e890f489bdc4a376c (diff)
downloadcups-5e6c3df7c0d322aa83a6c7bf94ab63a3f479a938.tar.gz
Security: Fix CERT VU #810572 exploiting the dynamic linker (STR #4609)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12700 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'scheduler/main.c')
-rw-r--r--scheduler/main.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/scheduler/main.c b/scheduler/main.c
index d5015aa4d..e03f88d79 100644
--- a/scheduler/main.c
+++ b/scheduler/main.c
@@ -1156,8 +1156,8 @@ cupsdAddString(cups_array_t **a, /* IO - String array */
if (!*a)
*a = cupsArrayNew3((cups_array_func_t)strcmp, NULL,
(cups_ahash_func_t)NULL, 0,
- (cups_acopy_func_t)_cupsStrAlloc,
- (cups_afree_func_t)_cupsStrFree);
+ (cups_acopy_func_t)strdup,
+ (cups_afree_func_t)free);
return (cupsArrayAdd(*a, (char *)s));
}
@@ -1187,7 +1187,7 @@ cupsdClearString(char **s) /* O - String value */
{
if (s && *s)
{
- _cupsStrFree(*s);
+ free(*s);
*s = NULL;
}
}
@@ -1268,10 +1268,10 @@ cupsdSetString(char **s, /* O - New string */
return;
if (*s)
- _cupsStrFree(*s);
+ free(*s);
if (v)
- *s = _cupsStrAlloc(v);
+ *s = strdup(v);
else
*s = NULL;
}
@@ -1302,13 +1302,13 @@ cupsdSetStringf(char **s, /* O - New string */
vsnprintf(v, sizeof(v), f, ap);
va_end(ap);
- *s = _cupsStrAlloc(v);
+ *s = strdup(v);
}
else
*s = NULL;
if (olds)
- _cupsStrFree(olds);
+ free(olds);
}
@@ -1468,8 +1468,7 @@ process_children(void)
}
if (job->printer_message)
- cupsdSetString(&(job->printer_message->values[0].string.text),
- message);
+ ippSetString(job->attrs, &job->printer_message, 0, message);
}
}