Bug 26311: (follow-up) Fix undefined values in sprintf