projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
757b86c
)
cpu detection: avoid a signed overflow
author
Sean McGovern
<gseanmcg@gmail.com>
Mon, 25 Jul 2011 22:51:02 +0000
(18:51 -0400)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Sat, 3 Sep 2011 15:31:50 +0000
(08:31 -0700)
1<<31 overflows because 1 is signed, so force it to unsigned.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
libavutil/x86/cpu.c
patch
|
blob
|
history
diff --git
a/libavutil/x86/cpu.c
b/libavutil/x86/cpu.c
index
78aeadf
..
f747e4d
100644
(file)
--- a/
libavutil/x86/cpu.c
+++ b/
libavutil/x86/cpu.c
@@
-113,7
+113,7
@@
int ff_get_cpu_flags_x86(void)
if(max_ext_level >= 0x80000001){
cpuid(0x80000001, eax, ebx, ecx, ext_caps);
- if (ext_caps & (1<<31))
+ if (ext_caps & (1
U
<<31))
rval |= AV_CPU_FLAG_3DNOW;
if (ext_caps & (1<<30))
rval |= AV_CPU_FLAG_3DNOWEXT;