Browse Source

modules: set VLC_MALLOC on strings allocated by a memstream

After vlc_memstream_close() the memstream cannot be used anymore.

(cherry picked from commit e52cc89f80) (edited)
edited:
- the smb2 code doesn't have the extra line ending
- 3.0 doesn't have the HLS stream output.
cherry-pick-c5513cf9
Steve Lhomme 3 years ago
parent
commit
1e71d438fe
  1. 2
      modules/access/http/message.h
  2. 2
      modules/access/smb2.c
  3. 2
      modules/demux/playlist/asx.c
  4. 2
      modules/keystore/kwallet.c
  5. 4
      modules/stream_out/es.c

2
modules/access/http/message.h

@ -401,7 +401,7 @@ static inline void vlc_http_stream_close(struct vlc_http_stream *s, bool abort)
* or NULL on error
*/
char *vlc_http_msg_format(const struct vlc_http_msg *m, size_t *restrict lenp,
bool proxied) VLC_USED;
bool proxied) VLC_USED VLC_MALLOC;
/**
* Parses an HTTP 1.1 message header.

2
modules/access/smb2.c

@ -407,7 +407,7 @@ FileControl(stream_t *access, int i_query, va_list args)
return VLC_SUCCESS;
}
static char *
VLC_MALLOC static char *
vlc_smb2_get_url(vlc_url_t *url, const char *file)
{
/* smb2://<psz_host><i_port><psz_path><file>?<psz_option> */

2
modules/demux/playlist/asx.c

@ -439,7 +439,7 @@ static void memstream_puts_xmlencoded(struct vlc_memstream* p_stream, const char
* - make tags and attributes upercase
* - escape strings when required
*/
static char* ASXToXML( char* psz_source )
VLC_MALLOC static char* ASXToXML( char* psz_source )
{
bool b_in_string= false;
char *psz_source_cur = psz_source;

2
modules/keystore/kwallet.c

@ -109,7 +109,7 @@ typedef struct vlc_keystore_sys
/* takes all values in the values of vlc_keystore_entry *
* and formats them in a url key */
static char*
VLC_MALLOC static char*
values2key( const char* const* ppsz_values, bool b_search )
{
char* psz_b64_realm = NULL;

4
modules/stream_out/es.c

@ -209,8 +209,8 @@ struct sout_stream_id_sys_t
sout_mux_t *p_mux;
};
static char * es_print_url( const char *psz_fmt, vlc_fourcc_t i_fourcc, int i_count,
const char *psz_access, const char *psz_mux )
VLC_MALLOC static char * es_print_url( const char *psz_fmt, vlc_fourcc_t i_fourcc, int i_count,
const char *psz_access, const char *psz_mux )
{
struct vlc_memstream stream;
unsigned char c;

Loading…
Cancel
Save