X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=httpd.cpp;h=3eda2a1e34b5d9fc7e62479d6a53ffe9612e3679;hb=835e7727e1d05190d550061cb8fc8cb2daa2283b;hp=29923f9430413ee5dec3175e0aaae42a7f257cf1;hpb=593173ffcdbccff777720b3c41c3e771fa93a10a;p=nageru diff --git a/httpd.cpp b/httpd.cpp index 29923f9..3eda2a1 100644 --- a/httpd.cpp +++ b/httpd.cpp @@ -51,6 +51,7 @@ void HTTPD::open_output_file(const string &filename) { AVFormatContext *avctx = avformat_alloc_context(); avctx->oformat = av_guess_format(NULL, filename.c_str(), NULL); + assert(filename.size() < sizeof(avctx->filename) - 1); strcpy(avctx->filename, filename.c_str()); string url = "file:" + filename;