[Mono-bugs] [Bug 29083][Nor] New - Unaligned access in handles.c

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
17 Aug 2002 03:28:56 -0000


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by crichton@gimp.org.

http://bugzilla.ximian.com/show_bug.cgi?id=29083

--- shadow/29083	Fri Aug 16 23:28:56 2002
+++ shadow/29083.tmp.26738	Fri Aug 16 23:28:56 2002
@@ -0,0 +1,37 @@
+Bug#: 29083
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: crichton@gimp.org               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Unaligned access in handles.c
+
+Simply put, handles.c has some code that does an unaligned access.  Patch
+is attached against CVS to clean it up.
+
+
+--
+
+--- io-layer/handles.c  20 Jul 2002 10:19:39 -0000      1.20
++++ io-layer/handles.c  17 Aug 2002 03:21:45 -0000
+@@ -432,6 +432,10 @@
+        struct _WapiScratchHeader *hdr, *last_hdr;
+        gboolean last_was_free=FALSE;
+        guchar *storage=&_wapi_shared_data->scratch_base[0];
++
++       /* Ok, bytes needs to be aligned */
++       /* Aligh to 32 bits = 4 bytes */
++       bytes = (((bytes) + 3) & (~3));
+
+ #ifdef DEBUG
+        g_message (G_GNUC_PRETTY_FUNCTION