svn commit: r185811 - projects/csup_cvsmode/contrib/csup
Ulf Lilleengen
lulf at FreeBSD.org
Tue Dec 9 13:10:09 PST 2008
Author: lulf
Date: Tue Dec 9 21:10:09 2008
New Revision: 185811
URL: http://svn.freebsd.org/changeset/base/185811
Log:
- Check return value of the encoded keyword before using it.
Pointed out by: Christian Weisgerber <naddy -at- mips.inka.de>
Modified:
projects/csup_cvsmode/contrib/csup/rcsfile.c
Modified: projects/csup_cvsmode/contrib/csup/rcsfile.c
==============================================================================
--- projects/csup_cvsmode/contrib/csup/rcsfile.c Tue Dec 9 21:09:05 2008 (r185810)
+++ projects/csup_cvsmode/contrib/csup/rcsfile.c Tue Dec 9 21:10:09 2008 (r185811)
@@ -232,6 +232,7 @@ rcsfile_send_details(struct rcsfile *rf,
{
struct delta *d;
struct tag *t;
+ const char *keyword;
int error;
assert(rf != NULL);
@@ -264,10 +265,13 @@ rcsfile_send_details(struct rcsfile *rf,
return(error);
/* Write expand. */
if (rf->expand != EXPAND_DEFAULT) {
- error = proto_printf(wr, "E %s\n",
- keyword_encode_expand(rf->expand));
- if (error)
- return(error);
+ keyword = keyword_encode_expand(rf->expand);
+ if (keyword != NULL) {
+ error = proto_printf(wr, "E %s\n",
+ keyword_encode_expand(rf->expand));
+ if (error)
+ return(error);
+ }
}
/* Write tags to server. */
More information about the svn-src-projects
mailing list