Sizeof is taken of the pointer variable, not the memory it points to.
Created attachment 85775 [details] [review] Patch for 1.6
Created attachment 85776 [details] [review] Patch for 1.7
Created attachment 85777 [details] [review] Patch for 1.6
Well spotted. I'll apply this soon. For future reference, you don't need to supply patches for both 1.6 and 1.7 if they're basically the same - I merge 1.6 into 1.7 whenever I change 1.6 anyway. I might not apply this to 1.6 because it's a developer-only change, and the stable branch is meant to get minimal changes.
Fixed in git for 1.7.6
Actually, the four bugs I submitted were found by a static code analysis tool. Okay, thanks.
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.