Re: [PATCH v3 07/28] hw/9pfs: Replace g_memdup() by g_memdup2()

2021-09-04 Thread Christian Schoenebeck
On Freitag, 3. September 2021 19:44:49 CEST Philippe Mathieu-Daudé wrote: > Per > https://discourse.gnome.org/t/port-your-module-from-g-memdup-to-g-memdup2-n > ow/5538 > > The old API took the size of the memory to duplicate as a guint, > whereas most memory functions take memory sizes as a gs

[PATCH v3 07/28] hw/9pfs: 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