This add a static inline version of `g_memdup2` if the version of glib we're
compiling against doesn't have the function.
GHSL-2021-045 was originally reported to glib at
https://gitlab.gnome.org/GNOME/glib/-/issues/2319.
More information about the entire situation can be found on the gnome
desktop-devel-list at
https://mail.gnome.org/archives/desktop-devel-list/2021-February/msg00000.html
Testing Done:
Compiled and ran tests locally.
Reviewed at https://reviews.imfreedom.org/r/483/
/*
* Purple's oscar protocol plugin
* This file is the legal property of its developers.
* Please see the AUTHORS file distributed alongside this file.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
/*
* Family 0x0001 - This is a very special group. All connections support
* this group, as it does some particularly good things (like rate limiting).
*/
#include"oscar.h"
#include"cipher.h"
/*
* Each time we make a FLAP connection to an oscar server the server gives
* us a list of rate classes. Each rate class has different properties for
* how frequently we can send SNACs in that rate class before we become
* throttled or disconnected.
*
* The server also gives us a list of every available SNAC and tells us which
* rate class it's in. There are a lot of different SNACs, so this list can be
* fairly large. One important characteristic of these rate classes is that
* currently (and since at least 2004) most SNACs are in the same rate class.
*
* One optimization we can do to save memory is to only keep track of SNACs
* that are in classes other than this default rate class. So if we try to
* look up a SNAC and it's not in our hash table then we can assume that it's