summaryrefslogtreecommitdiff
blob: 71d3009c8aca76981dc7f54cb8caa4ebac8d33a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
--- a/src/mp3-scanner.c
+++ b/src/mp3-scanner.c
@@ -1663,14 +1663,14 @@
     /* now check for an XING header */
     if(strncasecmp((char*)&buffer[index+fi.xing_offset+4],"XING",4) == 0) {
 	DPRINTF(E_DBG,L_SCAN,"Found Xing header\n");
-	xing_flags=*((int*)&buffer[index+fi.xing_offset+4+4]);
+	memcpy (&xing_flags, &buffer[index+fi.xing_offset+4+4], sizeof(int));
 	xing_flags=ntohs(xing_flags);
 
 	DPRINTF(E_DBG,L_SCAN,"Xing Flags: %02X\n",xing_flags);
 
 	if(xing_flags & 0x1) {
 	    /* Frames field is valid... */
-	    fi.number_of_frames=*((int*)&buffer[index+fi.xing_offset+4+8]);
+	    memcpy (&fi.number_of_frames, &buffer[index+fi.xing_offset+4+8], sizeof(int));
 	    fi.number_of_frames=ntohs(fi.number_of_frames);
 	}
     }