printf-format-fix.c revision 1dcf22e98ba8310e8daa8c9297936c6f3a645e7a
/* Copyright (c) 2002-2014 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "printf-format-fix.h"
static const char *
{
const char *errstr;
char *buf;
/* we'll assume that there's only one %m in the format string.
this simplifies the code and there's really no good reason to have
it multiple times. Callers can trap this case themselves. */
/* @UNSAFE */
return buf;
}
static const char *
{
const char *p;
for (p = format; *p != '\0'; ) {
if (*p++ == '%') {
switch (*p) {
case 'n':
i_panic("%%n modifier used");
case 'm':
i_panic("%%m used twice");
break;
case '\0':
}
p++;
}
}
return ret;
}
{
const char *ret;
return ret;
}
const char *printf_format_fix(const char *format)
{
const char *ret;
unsigned int len;
return ret;
}
const char *printf_format_fix_unsafe(const char *format)
{
unsigned int len;
}