aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/c1222
diff options
context:
space:
mode:
authorEvan Huus <eapache@gmail.com>2013-10-25 22:14:25 +0000
committerEvan Huus <eapache@gmail.com>2013-10-25 22:14:25 +0000
commit95f484a91ee34ea3caa2c325170e52d0bf07489b (patch)
tree83a02ff6f4f38f36c739e437881a432c75eb88b6 /asn1/c1222
parent7a3febacac8fd14009dc82dc4d139ee43d37a437 (diff)
Add a very small hack to make the UAT update callback error string freeable, and
convert all existing UAT update callbacks to use glib memory instead of ephemeral memory for that string. UAT code paths are entirely distinct from packet dissection, so using ephemeral memory was the wrong choice, because there was no guarantees about when it would be freed. The move away from emem still needs to be propogated deeper into the UAT code itself at some point. Net effect: remove another bunch of emem calls from dissectors, where replacing with wmem would have caused assertions. svn path=/trunk/; revision=52854
Diffstat (limited to 'asn1/c1222')
-rw-r--r--asn1/c1222/packet-c1222-template.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/asn1/c1222/packet-c1222-template.c b/asn1/c1222/packet-c1222-template.c
index 92b2b57883..022b255108 100644
--- a/asn1/c1222/packet-c1222-template.c
+++ b/asn1/c1222/packet-c1222-template.c
@@ -673,7 +673,7 @@ static const TOP_ELEMENT_CONTROL canonifyTable[] = {
{ FALSE, FALSE, 0x0, TRUE, NULL, NULL }
};
-static void
+static void
clear_canon(void)
{
const TOP_ELEMENT_CONTROL *t = canonifyTable;
@@ -736,10 +736,10 @@ c1222_uat_data_update_cb(void* n, const char** err)
c1222_uat_data_t* new_rec = (c1222_uat_data_t *)n;
if (new_rec->keynum > 0xff) {
- *err = "Invalid key number; must be less than 256";
+ *err = g_strdup("Invalid key number; must be less than 256");
}
if (new_rec->keylen != EAX_SIZEOF_KEY) {
- *err = "Invalid key size; must be 16 bytes";
+ *err = g_strdup("Invalid key size; must be 16 bytes");
}
}