]> the.earth.li Git - onak.git/blobdiff - wordlist.c
Add ability to drop overly large packets
[onak.git] / wordlist.c
index 605ec06967752a4209be7591c966d2209f6618d3..0feeb8217833eb6b375a9fce8d5c81de42dcf5e9 100644 (file)
  * more details.
  *
  * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc., 51
- * Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * this program.  If not, see <https://www.gnu.org/licenses/>.
  */
 
 #include <ctype.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 
 #include "ll.h"
 #include "decodekey.h"
-#include "log.h"
+#include "keystructs.h"
 #include "wordlist.h"
 
 /**
@@ -97,7 +97,7 @@ struct ll *makewordlistfromkey(struct ll *wordlist,
        struct ll  *wl = NULL;
 
        uids = keyuids(key, NULL);
-       for (i = 0; uids[i] != NULL; ++i) {
+       for (i = 0; uids != NULL && uids[i] != NULL; ++i) {
                words = makewordlist(NULL, uids[i]);
                for (wl = words; wl != NULL; wl = wl->next) {
                        if (llfind(wordlist, wl->object,