aklog: Fix segfault on aklog -path
authorAnders Kaseorg <andersk@mit.edu>
Tue, 30 Sep 2014 17:52:31 +0000 (13:52 -0400)
committerD Brashear <shadow@your-file-system.com>
Wed, 8 Oct 2014 14:29:28 +0000 (10:29 -0400)
commitfbea3265b3bc042b97be17229839ccf7d11a0bf9
tree1f76f0a3e39d3a73ca6fe5f965b2caab0b82007c
parentc6b61a4510c0c34688b979182ea6f3823a840296
aklog: Fix segfault on aklog -path

Commit 2fac53522e7ef5b3a376e191bffdc1f6784e6995 “aklog: Fix improper
use of readlink” inadvertently changed the meaning of int link from a
boolean flag (length > 0) to just a length.  This caused ‘aklog -path
(anything)’ to segfault.

Update the type of link and the condition of the while loop to account
for this change.

FIXES 131930

Change-Id: Ia05836795425a53e858ab29866900f6d45970644
Reviewed-on: http://gerrit.openafs.org/11517
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: D Brashear <shadow@your-file-system.com>
src/aklog/aklog.c