Chromium Code Reviews

Unified Diff: chrome/third_party/hunspell/src/hunspell/dictmgr.cxx

Issue 155841: Update Hunspell to the latest stable version to use the latest dictionary for... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: chrome/third_party/hunspell/src/hunspell/dictmgr.cxx
===================================================================
--- chrome/third_party/hunspell/src/hunspell/dictmgr.cxx (revision 21721)
+++ chrome/third_party/hunspell/src/hunspell/dictmgr.cxx (working copy)
@@ -135,15 +135,19 @@
*stringp = dp+1;
int nc = (int)((unsigned long)dp - (unsigned long)mp);
rv = (char *) malloc(nc+1);
- memcpy(rv,mp,nc);
- *(rv+nc) = '\0';
- return rv;
+ if (rv) {
+ memcpy(rv,mp,nc);
+ *(rv+nc) = '\0';
+ return rv;
+ }
} else {
rv = (char *) malloc(n+1);
- memcpy(rv, mp, n);
- *(rv+n) = '\0';
- *stringp = mp + n;
- return rv;
+ if (rv) {
+ memcpy(rv, mp, n);
+ *(rv+n) = '\0';
+ *stringp = mp + n;
+ return rv;
+ }
}
}
return NULL;
Property changes on: chrome\third_party\hunspell\src\hunspell\dictmgr.cxx
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « chrome/third_party/hunspell/src/hunspell/csutil.cxx ('k') | chrome/third_party/hunspell/src/hunspell/filemgr.hxx » ('j') | no next file with comments »

Powered by Google App Engine