magic(3): Fix program name extraction from core dumps.
authorSascha Wildner <saw@online.de>
Tue, 14 Apr 2009 22:44:25 +0000 (00:44 +0200)
committerSascha Wildner <saw@online.de>
Tue, 14 Apr 2009 22:44:25 +0000 (00:44 +0200)
commit138fde491d02cbf8ab1a0ef10447b93ac2cb2380
tree4b1d0d46dc381c33e98ea3c9875d6f2e8e016dc2
parent27292f35bd54f4abcf94857e4cce072c9b508b52
magic(3): Fix program name extraction from core dumps.

Remove trailing whitespace only instead of unconditionally removing the
last character from the program name (see comments).

Reported-by: hasso
Located-by: Eric J. Christeson
Taken-from:  FreeBSD's libmagic
contrib/file-4/src/readelf.c