#define ZEROMASK 0x7F7F7F7FU
#endif
-#define HASZERO(x) ~(((((x) &ZEROMASK) + ZEROMASK) | (x)) | ZEROMASK)
+#define HASZERO(x) ~(((((x) & ZEROMASK) + ZEROMASK) | (x)) | ZEROMASK)
gsize rspamd_strlcpy_fast(char *dst, const char *src, gsize siz)
{
o = out;
cols = 0;
- while (inlen > 6) {
+ while (inlen >= sizeof(n)) {
memcpy(&n, in, sizeof(n));
n = GUINT64_TO_BE(n);
*d++ = '\\';
*d++ = 'x';
*d++ = hexdigests[((t >> 4) & 0xF)];
- *d++ = hexdigests[((t) &0xF)];
+ *d++ = hexdigests[((t) & 0xF)];
continue; /* To avoid *d++ = t; */
}
else {