[BUGFIX] Check for NULL buffer before signature check