tag/ApeLoader: fix unaligned access

Fixes part 4 of https://github.com/MusicPlayerDaemon/MPD/issues/1490
This commit is contained in:
Max Kellermann 2022-04-26 21:00:26 +02:00
parent f2a3dfd700
commit fb8d8242ab
1 changed files with 2 additions and 2 deletions

View File

@ -73,10 +73,10 @@ try {
unsigned n = FromLE32(footer.count);
const char *p = buffer.get();
while (n-- && remaining > 10) {
size_t size = FromLE32(*(const uint32_t *)p);
size_t size = *(const PackedLE32 *)p;
p += 4;
remaining -= 4;
unsigned long flags = FromLE32(*(const uint32_t *)p);
unsigned long flags = *(const PackedLE32 *)p;
p += 4;
remaining -= 4;