aklog: Fix segfault on aklog -path
commit50c5f3789cc61de7ddbfe07922027b6464caa4ae
authorAnders Kaseorg <andersk@mit.edu>
Tue, 30 Sep 2014 17:52:31 +0000 (30 13:52 -0400)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 9 Oct 2014 09:20:13 +0000 (9 05:20 -0400)
tree6cfabe392e2603f0e924e935e6b770591e778998
parent38481450bba5f82b0eda072280737e438f9a11b5
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

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>
(cherry picked from commit fbea3265b3bc042b97be17229839ccf7d11a0bf9)

Change-Id: I6eb0126c574665507be923102c3fa812c3716352
Reviewed-on: http://gerrit.openafs.org/11530
Tested-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/aklog/aklog.c