Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2498
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/98/2498/1
coverity#705110: out-of-bounds write
Change-Id: I0edc69928d57eb9ff03a0004b10ca70e55988e68
---
M sal/osl/unx/file_misc.cxx
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index b91d803..adba5f5 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -1021,8 +1021,16 @@
return nRet;
}
else
- pszLinkContent[ nRet ] = 0;
-
+ {
+ if (nRet != PATH_MAX)
+ {
+ pszLinkContent[ nRet ] = 0;
+ }
+ else
+ {
+ pszLinkContent[PATH_MAX - 1] = 0;
+ }
+ }
nRet = symlink(pszLinkContent,pszDestFileName);
if ( nRet < 0 )
--
To view, visit https://gerrit.libreoffice.org/2498
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I0edc69928d57eb9ff03a0004b10ca70e55988e68
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Julien Nabet <serval2412@yahoo.fr>
Context
- [PATCH] coverity#705110: out-of-bounds write · Julien Nabet (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.