diff options
-rw-r--r-- | external/dtoa/UnpackedTarball_dtoa.mk | 1 | ||||
-rw-r--r-- | external/dtoa/coverity.patch | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/external/dtoa/UnpackedTarball_dtoa.mk b/external/dtoa/UnpackedTarball_dtoa.mk index c700b485fe8c..d0173408ce79 100644 --- a/external/dtoa/UnpackedTarball_dtoa.mk +++ b/external/dtoa/UnpackedTarball_dtoa.mk @@ -15,6 +15,7 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,dtoa,1)) $(eval $(call gb_UnpackedTarball_add_patches,dtoa, \ external/dtoa/include_header.patch \ + external/dtoa/coverity.patch \ )) # vim: set noet sw=4 ts=4: diff --git a/external/dtoa/coverity.patch b/external/dtoa/coverity.patch new file mode 100644 index 000000000000..3113e5dbc8ff --- /dev/null +++ b/external/dtoa/coverity.patch @@ -0,0 +1,34 @@ +--- dtor/src/dtoa.c.coverity ++++ dtor/src/dtoa.c +@@ -2303,6 +2303,7 @@ + if ((y = d1)) { + if ((k = lo0bits(&y))) { + x[0] = y | z << (32 - k); ++ assert(k < 32); /* https://bugs.python.org/issue23999 */ + z >>= k; + } + else +@@ -3031,6 +3032,7 @@ + || ((n = nbits & kmask) !=0 + && hi0bits(x[k-1]) < 32-n)) { + rshift(b,1); ++ /* coverity[dead_error_line] - not worth investigating */ + if (++e > Emax) + goto ovfl; + } +@@ -3347,6 +3349,7 @@ + if ((dd = s0[j++] - '0' - dig)) + goto ret; + if (!b->x[0] && b->wds == 1) { ++ /* coverity[copy_paste_error : FALSE] */ + if (i < nd) + dd = 1; + goto ret; +@@ -3609,6 +3612,7 @@ + switch(c = *++s) { + case '-': + esign = 1; ++ /* fall through */ + case '+': + c = *++s; + } |