hqd: Fix Klocwork errors in liblight

1. Fix null pointer de-reference klocwork error in liblight.
2. sprintf is part of ScanBan function. Replace sprintf with
   snprintf.

Change-Id: I0b88967a2bdf4adf563753c09df88d2c6a432045
1 file changed