Skip to content

WIP: Add builtin_object_size() checks

Tapasweni Pathak requested to merge (removed):builtin-object-size into master

Ref #1508.

This has implemention for g_strlcpy() with builtin_object_size() check.

  • Update g_strlcpy() to glib_g_strlcpy() and its implementation to have __attribute__(alias)
  • Add separate gstrfuncschk.c file and define the chk method aborting if size is less otherwise calling glib_g_strlcpy()
  • Define g_strlcpy() to call check with _builtin_object_size().

If this looks good I will go ahead with the following:

  • g_utf8_strlen()
  • g_utf8_strncpy()
  • g_utf8_strchr()
  • mostly here, memory functions
  • g_slice_copy()
  • g_slice_dup()
Edited by Tapasweni Pathak

Merge request reports