fixed, validate extradata before dereferencing it