]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
net_listen_unix(): If path is too long, return EOVERFLOW instead of EINVAL.
authorTimo Sirainen <tss@iki.fi>
Sat, 21 Sep 2013 23:24:05 +0000 (02:24 +0300)
committerTimo Sirainen <tss@iki.fi>
Sat, 21 Sep 2013 23:24:05 +0000 (02:24 +0300)
src/lib/net.c

index b2e9a09c9a6b830cc33fa5f5e2a159918da601e5..573041eb30b6b64ddeb438a7ca2462f6e57ba765 100644 (file)
@@ -461,7 +461,7 @@ int net_listen_unix(const char *path, int backlog)
        sa.un.sun_family = AF_UNIX;
        if (i_strocpy(sa.un.sun_path, path, sizeof(sa.un.sun_path)) < 0) {
                /* too long path */
-               errno = EINVAL;
+               errno = EOVERFLOW;
                return -1;
        }