fix buffer overflow introduced with r8876
investigate CID 1215084