]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced: fix log message for MapName_r
authorMichael Meffie <mmeffie@sinenomine.net>
Sat, 3 Mar 2012 15:05:01 +0000 (10:05 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 4 Apr 2013 11:19:00 +0000 (04:19 -0700)
Do not log a code of zero if the name plus instance length exceeds
the max pr name buffer.

Reviewed-on: http://gerrit.openafs.org/6861
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Reviewed-by: Alistair Ferguson <alistair.ferguson@mac.com>
Tested-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit ef6ae1e7eda56e1d6ff7b9ade25b290c855e5780)

Change-Id: If644670ed522eaba575e7246084f106231649991
Reviewed-on: http://gerrit.openafs.org/9474
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
src/viced/host.c

index 58106338ac00a664c3e808a878ad07e215d52ae2..9921912e68e740600ee509c1b7c4afc126096c4b 100644 (file)
@@ -2462,8 +2462,10 @@ h_FindClient_r(struct rx_connection *tcon)
                     tname, tinst, tcell, expTime, kvno));
            strncpy(uname, tname, sizeof(uname));
            if (ilen) {
-               if (strlen(uname) + 1 + ilen >= sizeof(uname))
+               if (strlen(uname) + 1 + ilen >= sizeof(uname)) {
+                   code = -1;
                    goto bad_name;
+               }
                strcat(uname, ".");
                strcat(uname, tinst);
            }