src: fix limit calculation · nodejs/node@2ca3714 · GitHub
Skip to content

Commit 2ca3714

Browse files
mhdawsondanielleadams
authored andcommitted
src: fix limit calculation
Coverity reported that the use of sizeof along with pointer arithmetic was likely an error as the pointer arithmetic would already be accounting for the size of what the pointer points to. Looking at the code that looked right but removing the extra sizeOf caused tests to fail. Looking more closely it seems like we were not allocating a big enough buffer but the extra sizeof was allowing us to convert even though it might have been corrupting memory. Signed-off-by: Michael Dawson <mdawson@devrus.com> PR-URL: #41026 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 0bf8291 commit 2ca3714

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/node_i18n.cc

Lines changed: 4 additions & 3 deletions

0 commit comments

Comments
 (0)