Module Name: src
Committed By: jdolecek
Date: Sat Nov 25 17:18:15 UTC 2017
Modified Files:
src/usr.bin/audio/common: wav.c
Log Message:
need getle16() for ext.sub_tag too
PR bin/52762 by Yosuke Sugahara
To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/usr.bin/audio/common/wav.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/audio/common/wav.c
diff -u src/usr.bin/audio/common/wav.c:1.13 src/usr.bin/audio/common/wav.c:1.14
--- src/usr.bin/audio/common/wav.c:1.13 Wed Aug 5 06:54:39 2015
+++ src/usr.bin/audio/common/wav.c Sat Nov 25 17:18:15 2017
@@ -1,4 +1,4 @@
-/* $NetBSD: wav.c,v 1.13 2015/08/05 06:54:39 mrg Exp $ */
+/* $NetBSD: wav.c,v 1.14 2017/11/25 17:18:15 jdolecek Exp $ */
/*
* Copyright (c) 2002, 2009 Matthew R. Green
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: wav.c,v 1.13 2015/08/05 06:54:39 mrg Exp $");
+__RCSID("$NetBSD: wav.c,v 1.14 2017/11/25 17:18:15 jdolecek Exp $");
#endif
@@ -140,7 +140,7 @@ audio_wav_parse_hdr(void *hdr, size_t sz
memcpy(&ext, owhere + sizeof fmt, sizeof ext);
if (getle16(ext.len) < sizeof(ext) - sizeof(ext.len))
return (AUDIO_ESHORTHDR);
- fmttag = ext.sub_tag;
+ fmttag = getle16(ext.sub_tag);
if (verbose)
printf("WAVE extensible sub tag: %x\n", fmttag);
}