From dd7846e30974d4a4d6d22052da5a6bf864e3b6fe Mon Sep 17 00:00:00 2001 From: Rose <83477269+AtariDreams@users.noreply.github.com> Date: Sun, 23 Apr 2023 12:25:39 -0400 Subject: [PATCH] UBSan: Contain pos - fp->bufpos in parentheses Yes I know this shouldn't change the behavior in theory, but clang insists it does in practice, so to quiet the UBSan, I put parentheses around pos - fp->bufpos. --- cups/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cups/file.c b/cups/file.c index 2fd0780804..ead31aab5f 100644 --- a/cups/file.c +++ b/cups/file.c @@ -1825,7 +1825,7 @@ cupsFileSeek(cups_file_t *fp, /* I - CUPS file */ */ fp->pos = pos; - fp->ptr = fp->buf + pos - fp->bufpos; + fp->ptr = fp->buf + (pos - fp->bufpos); fp->eof = 0; return (pos); -- 2.47.2