Commit Diff


commit - 7bb76d658a1c4c378de67f8708ac4ebf8dbb557f
commit + 4cf64a8f00ef417fd889a5f1d83e87f9d6aa73dd
blob - ee9baeddee5d75e361dcdf83556384362d8207ca
blob + c17663ef4dc9f2d5bbb82ea8ea1e4811d033510c
--- opensmtpd.c
+++ opensmtpd.c
@@ -1509,10 +1509,16 @@ osmtpd_link_greeting(struct osmtpd_callback *cb, struc
 
 static void
 osmtpd_link_identify(struct osmtpd_callback *cb, struct osmtpd_session *session,
-    char *identity, __unused char *linedup)
+    char *params, __unused char *linedup)
 {
 	int (*f)(struct osmtpd_ctx *, const char *);
+	char *identity;
 
+	if ((identity = strchr(params, '|')) == NULL)
+		osmtpd_errx(1, "Invalid line received: missing identity: %s",
+		    linedup);
+	identity++;
+
 	if (cb->storereport) {
 		free(session->ctx.identity);
 		if ((session->ctx.identity = strdup(identity)) == NULL)