Line 0
Link Here
|
|
|
1 |
--- libsylph/procmsg.c.orig 2014-06-10 04:06:35 UTC |
2 |
+++ libsylph/procmsg.c |
3 |
@@ -164,7 +164,7 @@ static gint procmsg_read_cache_data_str_ |
4 |
if (endp - *p < sizeof(len)) |
5 |
return -1; |
6 |
|
7 |
- len = *(const guint32 *)(*p); |
8 |
+ memcpy(&len, *p, sizeof(len)); |
9 |
*p += sizeof(len); |
10 |
if (len > G_MAXINT || len > endp - *p) |
11 |
return -1; |
12 |
@@ -197,7 +197,7 @@ static gint procmsg_read_cache_data_str_ |
13 |
g_mapped_file_free(mapfile); \ |
14 |
return NULL; \ |
15 |
} else { \ |
16 |
- n = *(const guint32 *)p; \ |
17 |
+ memcpy(&n, p, sizeof(n)); \ |
18 |
p += sizeof(guint32); \ |
19 |
} \ |
20 |
} |