]> gitweb @ CieloNegro.org - pkgsrc-firefox3.git/blob - patches/patch-ee
Initial revision of the upstream www/firefox3
[pkgsrc-firefox3.git] / patches / patch-ee
1 $NetBSD: patch-ee,v 1.1 2008/12/13 00:42:26 martin Exp $
2
3 # reported upstream as: https://bugzilla.mozilla.org/show_bug.cgi?id=469276
4
5 --- toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp.orig     2008-08-25 22:59:14.000000000 +0200
6 +++ toolkit/components/url-classifier/src/nsUrlClassifierDBService.cpp  2008-12-12 16:31:11.000000000 +0100
7 @@ -2023,8 +2023,9 @@
8            return NS_ERROR_FAILURE;
9          }
10          const nsCSubstring& str = Substring(chunk, start, 4);
11 -        const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading());
12 -        entry->mAddChunkId = PR_ntohl(*p);
13 +        PRUint32 p;
14 +       memcpy(&p, str.BeginReading(), 4);
15 +        entry->mAddChunkId = PR_ntohl(p);
16          if (entry->mAddChunkId == 0) {
17            NS_WARNING("Received invalid chunk number.");
18            return NS_ERROR_FAILURE;
19 @@ -2052,8 +2053,9 @@
20  
21          if (chunkType == CHUNK_SUB) {
22            const nsCSubstring& str = Substring(chunk, start, 4);
23 -          const PRUint32 *p = reinterpret_cast<const PRUint32*>(str.BeginReading());
24 -          entry->mAddChunkId = PR_ntohl(*p);
25 +         PRUint32 p;
26 +         memcpy(&p, str.BeginReading(), 4);
27 +          entry->mAddChunkId = PR_ntohl(p);
28            if (entry->mAddChunkId == 0) {
29              NS_WARNING("Received invalid chunk number.");
30              return NS_ERROR_FAILURE;