mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Correctly check for bad options to the "PublishServerDescriptor"
config option. Bugfix on 0.2.0.1-alpha; reported by Matt Edman. svn:r11968
This commit is contained in:
parent
dbdaa610ee
commit
5aa76cdaa8
@ -22,6 +22,8 @@ Changes in version 0.2.0.9-alpha - 2007-10-??
|
|||||||
- Make the "next period" votes into "current period" votes immediately
|
- Make the "next period" votes into "current period" votes immediately
|
||||||
after publishing the consensus; avoid a heisenbug that made them stick
|
after publishing the consensus; avoid a heisenbug that made them stick
|
||||||
around indefinitely.
|
around indefinitely.
|
||||||
|
- Correctly check for bad options to the "PublishServerDescriptor"
|
||||||
|
config option. Bugfix on 0.2.0.1-alpha; reported by Matt Edman.
|
||||||
|
|
||||||
o Minor bugfixes (memory leaks):
|
o Minor bugfixes (memory leaks):
|
||||||
- Stop leaking memory on failing case of base32_decode. Bugfix on
|
- Stop leaking memory on failing case of base32_decode. Bugfix on
|
||||||
|
@ -2391,9 +2391,8 @@ ensure_bandwidth_cap(uint64_t *value, const char *desc, char **msg)
|
|||||||
|
|
||||||
/** Parse an authority type from <b>list</b> and write it to *<b>auth</b>. If
|
/** Parse an authority type from <b>list</b> and write it to *<b>auth</b>. If
|
||||||
* <b>compatible</b> is non-zero, treat "1" as "v1,v2" and treat "0" as "".
|
* <b>compatible</b> is non-zero, treat "1" as "v1,v2" and treat "0" as "".
|
||||||
* Return 0 on success or -(idx of first bad member) if not a recognized
|
* Return 0 on success or -1 if not a recognized authority type (in which
|
||||||
* authority type.
|
* case the value of *<b>auth</b> is undefined). */
|
||||||
*/
|
|
||||||
static int
|
static int
|
||||||
parse_authority_type_from_list(smartlist_t *list, authority_type_t *auth,
|
parse_authority_type_from_list(smartlist_t *list, authority_type_t *auth,
|
||||||
int compatible)
|
int compatible)
|
||||||
@ -2418,7 +2417,7 @@ parse_authority_type_from_list(smartlist_t *list, authority_type_t *auth,
|
|||||||
else if (!strcasecmp(string, "") || (compatible && !strcmp(string, "0")))
|
else if (!strcasecmp(string, "") || (compatible && !strcmp(string, "0")))
|
||||||
/* no authority */;
|
/* no authority */;
|
||||||
else
|
else
|
||||||
return - string_sl_idx;
|
return -1;
|
||||||
});
|
});
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user