Revert "Cumulative patch from commit 4ec1fd8e42bad9390f14a58225b6e5f6fb691950"

This reverts commit 78a5dac804c22aa6e4ec8226a864d3b0d6ccddbb.

Test: None
diff --git a/src/utils/Makefile b/src/utils/Makefile
index 52efc53..8aad813 100644
--- a/src/utils/Makefile
+++ b/src/utils/Makefile
@@ -17,7 +17,6 @@
 	base64.o \
 	bitfield.o \
 	common.o \
-	crc32.o \
 	ip_addr.o \
 	radiotap.o \
 	trace.o \
diff --git a/src/utils/common.c b/src/utils/common.c
index 04a533a..68413b2 100644
--- a/src/utils/common.c
+++ b/src/utils/common.c
@@ -1001,7 +1001,7 @@
  * @delim: a string of delimiters
  * @last: a pointer to a character following the returned token
  *      It has to be set to NULL for the first call and passed for any
- *      further call.
+ *      futher call.
  * Returns: a pointer to token position in str or NULL
  *
  * This function is similar to str_token, but it can be used with both
diff --git a/src/utils/crc32.h b/src/utils/crc32.h
deleted file mode 100644
index dc31399..0000000
--- a/src/utils/crc32.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/*
- * 32-bit CRC for FCS calculation
- * Copyright (c) 2010, Jouni Malinen <j@w1.fi>
- *
- * This software may be distributed under the terms of the BSD license.
- * See README for more details.
- */
-
-#ifndef CRC32_H
-#define CRC32_H
-
-u32 crc32(const u8 *frame, size_t frame_len);
-
-#endif /* CRC32_H */
diff --git a/src/utils/wpabuf.c b/src/utils/wpabuf.c
index 77ee472..96cb25c 100644
--- a/src/utils/wpabuf.c
+++ b/src/utils/wpabuf.c
@@ -244,13 +244,15 @@
 
 	if (a)
 		len += wpabuf_len(a);
-	len += wpabuf_len(b);
+	if (b)
+		len += wpabuf_len(b);
 
 	n = wpabuf_alloc(len);
 	if (n) {
 		if (a)
 			wpabuf_put_buf(n, a);
-		wpabuf_put_buf(n, b);
+		if (b)
+			wpabuf_put_buf(n, b);
 	}
 
 	wpabuf_free(a);