advapi32: Prevent buffer overrun.