Use strtol() in place of atoi() to better verify integer parameters

Per GitHub #127
This commit is contained in:
Ian Barwick
2015-11-06 09:27:21 +09:00
committed by Ian Barwick
parent c0911d3286
commit e12be52fa8
3 changed files with 100 additions and 17 deletions

View File

@@ -88,5 +88,8 @@ bool reload_config(t_configuration_options *orig_options);
bool parse_config(t_configuration_options *options);
void parse_line(char *buff, char *name, char *value);
char *trim(char *s);
int repmgr_atoi(const char *s,
const char *config_item,
void (*error_callback)(char *error_message));
#endif