/*
* snprintf functions for CUPS.
*
+ * Copyright © 2021 by OpenPrinting
* Copyright © 2007-2019 by Apple Inc.
* Copyright © 1997-2007 by Easy Software Products.
*
* Nul-terminate the string and return the number of characters needed.
*/
- *bufptr = '\0';
+ if (bufptr)
+ *bufptr = '\0';
return (bytes);
}