Security fix 1/4 for CVE-2010-3069

This part only fixes source/lib/util_sid.c