projects
/
sxemacs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d3aa50
)
Coverity: Division by zero: CID 400004
author
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 29 Feb 2012 19:53:52 +0000
(14:53 -0500)
committer
Nelson Ferreira
<nelson.ferreira@ieee.org>
Wed, 29 Feb 2012 19:53:52 +0000
(14:53 -0500)
* src/media/media.c (Fmedia_stream_aspect): assert for den != 0,
with additional check for the "already crashing" scenario.
Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
src/media/media.c
patch
|
blob
|
history
diff --git
a/src/media/media.c
b/src/media/media.c
index
a6668cf
..
1f0b96d
100644
(file)
--- a/
src/media/media.c
+++ b/
src/media/media.c
@@
-1103,7
+1103,9
@@
the second element to the second one and so on.
}
if (LIKELY(NILP(quotientp))) {
- tmp = make_float((fpfloat)num / (fpfloat)den);
+ assert(den != 0);
+ if( den != 0)
+ tmp = make_float((fpfloat)num / (fpfloat)den);
}
#if defined HAVE_MPQ && defined WITH_GMP
else {