gst-libav1: update to 1.24.11
[oi-userland.git] / components / library / idnkit / patches / 001-lib-api.c.patch
blobe42e43bcef5b04272055a55b1f624d9513538e6f
1 Oracle patch to handle invalid inputs
2 Sent upstream via e-mail
3 diff --git a/lib/api.c b/lib/api.c
4 --- a/lib/api.c
5 +++ b/lib/api.c
6 @@ -270,6 +270,10 @@
7 char actions_string[ACTION_STRING_BUFSIE];
9 assert(from != NULL && to != NULL);
10 +#ifdef SUN_CHANGE
11 + if (from == NULL || to == NULL)
12 + return (idn_invalid_name);
13 +#endif /* SUN_CHANGE */
15 idn__res_actionstostring(actions, actions_string);
16 TRACE(("idn_encodename(actions=%s, from=\"%s\", tolen=%d)\n",
17 @@ -296,6 +300,10 @@
18 char actions_string[ACTION_STRING_BUFSIE];
20 assert(from != NULL && to != NULL);
21 +#ifdef SUN_CHANGE
22 + if (from == NULL || to == NULL)
23 + return (idn_invalid_name);
24 +#endif /* SUN_CHANGE */
26 idn__res_actionstostring(actions, actions_string);
27 TRACE(("idn_decodename(actions=%s, from=\"%s\", tolen=%d)\n",
28 @@ -323,6 +331,10 @@
29 char actions_string[ACTION_STRING_BUFSIE];
31 assert(from != NULL && to != NULL);
32 +#ifdef SUN_CHANGE
33 + if (from == NULL || to == NULL)
34 + return (idn_invalid_name);
35 +#endif /* SUN_CHANGE */
37 idn__res_actionstostring(actions, actions_string);
38 TRACE(("idn_decodename2(actions=%s, from=\"%s\", tolen=%d, "
39 @@ -360,6 +372,10 @@
40 char actions2_string[ACTION_STRING_BUFSIE];
42 assert(name1 != NULL && name2 != NULL);
43 +#ifdef SUN_CHANGE
44 + if (name1 == NULL || name2 == NULL)
45 + return (idn_invalid_name);
46 +#endif /* SUN_CHANGE */
48 idn__res_actionstostring(actions1, actions1_string);
49 idn__res_actionstostring(actions2, actions2_string);
50 @@ -391,6 +407,10 @@
51 char actions_string[ACTION_STRING_BUFSIE];
53 assert(name != NULL);
54 +#ifdef SUN_CHANGE
55 + if (name == NULL)
56 + return (idn_invalid_name);
57 +#endif /* SUN_CHANGE */
59 idn__res_actionstostring(actions, actions_string);
60 TRACE(("idn_checkname(actions=%s, name=\"%s\")\n",