|
|
06e076c |
--- milter-regex-1.9/eval.c
|
|
|
06e076c |
+++ milter-regex-1.9/eval.c
|
|
|
06e076c |
@@ -43,7 +43,7 @@
|
|
|
06e076c |
#define REG_BASIC 0
|
|
|
06e076c |
#endif
|
|
|
06e076c |
|
|
|
06e076c |
-extern int yyerror(char *, ...);
|
|
|
06e076c |
+extern int yyerror(const char *, ...);
|
|
|
06e076c |
extern void die(const char *);
|
|
|
06e076c |
static void mutex_lock(void);
|
|
|
06e076c |
static void mutex_unlock(void);
|
|
|
06e076c |
--- milter-regex-1.9/milter-regex.c
|
|
|
06e076c |
+++ milter-regex-1.9/milter-regex.c
|
|
|
06e076c |
@@ -135,6 +135,7 @@
|
|
|
06e076c |
|
|
|
06e076c |
#if __linux__ || __sun__
|
|
|
06e076c |
#define ST_MTIME st_mtime
|
|
|
06e076c |
+extern size_t strlcat(char *, const char *, size_t);
|
|
|
06e076c |
extern size_t strlcpy(char *, const char *, size_t);
|
|
|
06e076c |
#else
|
|
|
06e076c |
#define ST_MTIME st_mtimespec
|
|
|
06e076c |
@@ -621,7 +622,10 @@
|
|
|
06e076c |
cb_body, /* body block */
|
|
|
06e076c |
cb_eom, /* end of message */
|
|
|
06e076c |
NULL, /* message aborted */
|
|
|
06e076c |
- cb_close /* connection cleanup */
|
|
|
06e076c |
+ cb_close, /* connection cleanup */
|
|
|
06e076c |
+ NULL, /* unrecognized or unimplemented command filter */
|
|
|
06e076c |
+ NULL, /* SMTP DATA command filter */
|
|
|
06e076c |
+ NULL /* negotiation callback */
|
|
|
06e076c |
};
|
|
|
06e076c |
|
|
|
06e076c |
static void
|
|
|
06e076c |
--- milter-regex-1.9/parse.y
|
|
|
06e076c |
+++ milter-regex-1.9/parse.y
|
|
|
06e076c |
@@ -43,7 +43,7 @@
|
|
|
06e076c |
|
|
|
06e076c |
#include "eval.h"
|
|
|
06e076c |
|
|
|
06e076c |
-int yyerror(char *, ...);
|
|
|
06e076c |
+int yyerror(const char *, ...);
|
|
|
06e076c |
static int yyparse(void);
|
|
|
06e076c |
static int define_macro(const char *, struct expr *);
|
|
|
06e076c |
static struct expr *find_macro(const char *);
|
|
|
06e076c |
@@ -254,7 +254,7 @@
|
|
|
06e076c |
%%
|
|
|
06e076c |
|
|
|
06e076c |
int
|
|
|
06e076c |
-yyerror(char *fmt, ...)
|
|
|
06e076c |
+yyerror(const char *fmt, ...)
|
|
|
06e076c |
{
|
|
|
06e076c |
va_list ap;
|
|
|
06e076c |
errors = 1;
|
|
|
06e076c |
@@ -359,7 +359,7 @@
|
|
|
06e076c |
|
|
|
06e076c |
while ((c = lgetc(fin)) != EOF && c != del) {
|
|
|
06e076c |
*p++ = c;
|
|
|
06e076c |
- if (p - buf >= sizeof(buf) - 1) {
|
|
|
06e076c |
+ if ((size_t)(p - buf) >= sizeof(buf) - 1) {
|
|
|
06e076c |
yyerror("yylex: message too long");
|
|
|
06e076c |
return (ERROR);
|
|
|
06e076c |
}
|
|
|
06e076c |
@@ -379,7 +379,7 @@
|
|
|
06e076c |
|
|
|
06e076c |
do {
|
|
|
06e076c |
*p++ = c;
|
|
|
06e076c |
- if (p - buf >= sizeof(buf)) {
|
|
|
06e076c |
+ if ((size_t)(p - buf) >= sizeof(buf)) {
|
|
|
06e076c |
yyerror("yylex: token too long");
|
|
|
06e076c |
return (ERROR);
|
|
|
06e076c |
}
|
|
|
06e076c |
@@ -406,7 +406,7 @@
|
|
|
06e076c |
*p++ = del;
|
|
|
06e076c |
while ((c = lgetc(fin)) != EOF && c != '\n' && c != del) {
|
|
|
06e076c |
*p++ = c;
|
|
|
06e076c |
- if (p - buf >= sizeof(buf) - 1) {
|
|
|
06e076c |
+ if ((size_t)(p - buf) >= sizeof(buf) - 1) {
|
|
|
06e076c |
yyerror("yylex: argument too long");
|
|
|
06e076c |
return (ERROR);
|
|
|
06e076c |
}
|
|
|
06e076c |
@@ -415,7 +415,7 @@
|
|
|
06e076c |
*p++ = del;
|
|
|
06e076c |
while ((c = lgetc(fin)) != EOF && isalpha(c)) {
|
|
|
06e076c |
*p++ = c;
|
|
|
06e076c |
- if (p - buf >= sizeof(buf)) {
|
|
|
06e076c |
+ if ((size_t)(p - buf) >= sizeof(buf)) {
|
|
|
06e076c |
yyerror("yylex: argument too long");
|
|
|
06e076c |
return (ERROR);
|
|
|
06e076c |
}
|