- Check return value of the encoded keyword before using it.
Pointed out by: Christian Weisgerber <naddy -at- mips.inka.de>
This commit is contained in:
parent
9178dc306f
commit
4390381ebd
@ -232,6 +232,7 @@ rcsfile_send_details(struct rcsfile *rf, struct stream *wr)
|
||||
{
|
||||
struct delta *d;
|
||||
struct tag *t;
|
||||
const char *keyword;
|
||||
int error;
|
||||
|
||||
assert(rf != NULL);
|
||||
@ -264,10 +265,13 @@ rcsfile_send_details(struct rcsfile *rf, struct stream *wr)
|
||||
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. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user