diff options
author | Caolán McNamara <cmc@openoffice.org> | 2009-10-29 20:47:53 +0000 |
---|---|---|
committer | Caolán McNamara <cmc@openoffice.org> | 2009-10-29 20:47:53 +0000 |
commit | a0761a87853911b3e6a75e993a99d08e608fcf14 (patch) | |
tree | b22dd83f4f0c4de93f99f52442532ea95de0bae3 /hwpfilter | |
parent | d6a487f786328f689c73a86afef7fd550febca35 (diff) |
#cmcfixes65: #i106454# silence fortify warnings
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/himgutil.cpp | 3 | ||||
-rw-r--r-- | hwpfilter/source/lexer.cpp | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/hwpfilter/source/himgutil.cpp b/hwpfilter/source/himgutil.cpp index 66916646c780..cdb0c3b99bd9 100644 --- a/hwpfilter/source/himgutil.cpp +++ b/hwpfilter/source/himgutil.cpp @@ -106,7 +106,8 @@ const char *GetEmbImgname(const EmPicture * empic) char *ptr; const char *ext; - tmpnam(fname); + if (tmpnam(fname) == NULL) + return NULL; if (!empic || !empic->name[0] || (0 == (ptr = strrchr(fname, DIRSEP)))) return NULL; switch (ImageMagicType((uchar *) empic->data)) diff --git a/hwpfilter/source/lexer.cpp b/hwpfilter/source/lexer.cpp index fd17509bbb7e..4ef976fcd5f8 100644 --- a/hwpfilter/source/lexer.cpp +++ b/hwpfilter/source/lexer.cpp @@ -1126,7 +1126,7 @@ YY_MALLOC_DECL /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, |