A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
[pvs] Possible overflow. Cast operands of the '1 << type' operator to the 'size_t...
[simgrid.git]
/
src
/
xbt
/
mmalloc
/
mrealloc.c
diff --git
a/src/xbt/mmalloc/mrealloc.c
b/src/xbt/mmalloc/mrealloc.c
index
9e9a877
..
1bdd724
100644
(file)
--- a/
src/xbt/mmalloc/mrealloc.c
+++ b/
src/xbt/mmalloc/mrealloc.c
@@
-129,7
+129,7
@@
void *mrealloc(xbt_mheap_t mdp, void *ptr, size_t size)
abort();
}
- if (size > (
size_t) (1 << (type - 1)) && size <= (size_t) (
1 << type)) {
+ if (size > (
(size_t)1 << (type - 1)) && size <= ((size_t)
1 << type)) {
/* The new size is the same kind of fragment. */
result = ptr;