Open
Bug 1334311
Opened 8 years ago
Updated 2 years ago
PR_vsnprintf use in webmdemux_log
Categories
(Core :: Audio/Video: Playback, defect, P5)
Core
Audio/Video: Playback
Tracking
()
NEW
People
(Reporter: tromey, Unassigned)
References
Details
Even after bug 1060419 lands, there will be a call to PR_vsnprintf in webmdemux_log.
One way to fix this would be to change the code a bit to use SprintfLiteral
just to print the incoming arguments; then do the extra printing directly
in the invocation of MOZ_LOG.
However, in order to do this properly, first nestegg must be fixed to add
the appropriate printf attribute. I gave this a whirl and it showed that
nestegg seems to be assuming an NSPR-like printf. You can try it upstream
like:
diff --git a/include/nestegg/nestegg.h b/include/nestegg/nestegg.h
index d91483b..102e2fc 100644
--- a/include/nestegg/nestegg.h
+++ b/include/nestegg/nestegg.h
@@ -159,8 +159,15 @@ typedef struct {
uint64_t seek_preroll;/**< Nanoseconds that must be discarded after a seek. */
} nestegg_audio_params;
+#if __GNUC__
+#define NESTEGG_PRINTF(x, y) __attribute__((format(printf, x, y)))
+#else
+#define NESTEGG_PRINTF(x, y)
+#endif
+
/** Logging callback function pointer. */
-typedef void (* nestegg_log)(nestegg * context, unsigned int severity, char const * format, ...);
+typedef void (* nestegg_log)(nestegg * context, unsigned int severity, char const * format, ...)
+ NESTEGG_PRINTF(3, 4);
/** Initialize a nestegg context. During initialization the parser will
read forward in the stream processing all elements until the first
We're rewriting nestegg in Rust so this probably isn't worth doing.
Priority: -- → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•