Same fix for firefox35

Index: Makefile
===================================================================
RCS file: /srv/boron/data/vcs/cvs/openbsd/ports/www/firefox35/Makefile,v
retrieving revision 1.60
diff -u -p -r1.60 Makefile
--- Makefile    2 Mar 2011 14:41:09 -0000       1.60
+++ Makefile    18 Mar 2011 07:39:22 -0000
@@ -6,6 +6,7 @@ MOZILLA_VERSION =       3.5.17
 MOZILLA_BRANCH =       1.9.1
 MOZILLA_PROJECT =      firefox35
 MOZILLA_CODENAME =     browser
+REVISION =             0
 
 SO_VERSION =   24.0
 # NOTE: Must bump minor version if any shlib's are removed from the
Index: patches/patch-gfx_ots_include_opentype-sanitiser_h
===================================================================
RCS file: patches/patch-gfx_ots_include_opentype-sanitiser_h
diff -N patches/patch-gfx_ots_include_opentype-sanitiser_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-gfx_ots_include_opentype-sanitiser_h  18 Mar 2011 07:38:16 
-0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Fix strict alignment architectures
+
+--- gfx/ots/include/opentype-sanitiser.h.orig  Fri Mar 18 00:02:27 2011
++++ gfx/ots/include/opentype-sanitiser.h       Fri Mar 18 00:02:35 2011
+@@ -64,8 +64,10 @@ class OTSStream {
+     }
+ 
+     while (length >= 4) {
+-      chksum_ += ntohl(*reinterpret_cast<const uint32_t*>(
+-          reinterpret_cast<const uint8_t*>(data) + offset));
++      uint32_t tmp;
++      std::memcpy(&tmp, reinterpret_cast<const uint8_t *>(data) + offset,
++        sizeof(uint32_t));
++      chksum_ += ntohl(tmp);
+       length -= 4;
+       offset += 4;
+     }

Reply via email to