Files
repmgr/strutil.h
Dan Farina 916c0492fb sprintf to snprintf conversion
Move out string operations to another file, and introduce a frontend
to snprintf for various situations.  This change is important for
catching and eliminating sprintf overflows, which are as of now many
times silently corrupting memory.

Signed-off-by: Dan Farina <drfarina@acm.org>
Signed-off-by: Peter van Hardenberg <pvh@heroku.com>
2010-12-21 15:19:28 -08:00

20 lines
375 B
C

/*
* strutil.h
*
* Copyright (c) Heroku, 2010
*
*/
#ifndef _STRUTIL_H_
#define _STRUTIL_H_
#define QUERY_STR_LEN 8192
#define MAXLEN 80
extern int xsnprintf(char *str, size_t size, const char *format, ...);
extern int sqlquery_snprintf(char *str, const char *format, ...);
extern int maxlen_snprintf(char *str, const char *format, ...);
#endif /* _STRUTIL_H_ */