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: If408be6040481f5edda78cfeed477b30ab5b5e73
Merge branch 'cm-11.0' of https://github.com/CyanogenMod/android_device_samsung_serrano-common into kk_mkt