Re: [PATCH v3 24/28] tests/qtest: Replace g_memdup() by g_memdup2()

2021-12-17 Thread Laurent Vivier
Le 03/09/2021 à 19:45, Philippe Mathieu-Daudé a écrit : Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 The old API took the size of the memory to duplicate as a guint, whereas most memory functions take memory sizes as a gsize. This made it easy

Re: [PATCH v3 24/28] tests/qtest: Replace g_memdup() by g_memdup2()

2021-09-03 Thread Thomas Huth
On 03/09/2021 19.45, Philippe Mathieu-Daudé wrote: Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 The old API took the size of the memory to duplicate as a guint, whereas most memory functions take memory sizes as a gsize. This made it easy to ac

[PATCH v3 24/28] tests/qtest: Replace g_memdup() by g_memdup2()

2021-09-03 Thread Philippe Mathieu-Daudé
Per https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-now/5538 The old API took the size of the memory to duplicate as a guint, whereas most memory functions take memory sizes as a gsize. This made it easy to accidentally pass a gsize to g_memdup(). For large value