Changeset e14f2110f980c64ca22d22aa667fc67c039bbccd
- Timestamp:
- 03/03/08 18:58:50
(9 months ago)
- Author:
- Rémi Denis-Courmont <rem@videolan.org>
- git-committer:
- Rémi Denis-Courmont <rem@videolan.org> 1204567130 +0200
- git-parent:
[17291ac5f14e95b0698281ba72c0373b887aee4e]
- git-author:
- Rémi Denis-Courmont <rem@videolan.org> 1204567130 +0200
- Message:
Fix a bunch of format string injection in the Real RTSP access
...or why is asprintf() not the same as strdup().
Signed-off-by: Rémi Denis-Courmont <rem@videolan.org>
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r17291ac |
re14f211 |
|
| 818 | 818 | psz[i_len] = '\0'; |
|---|
| 819 | 819 | |
|---|
| | 820 | EnsureUTF8( psz ); |
|---|
| 820 | 821 | msg_Dbg( p_demux, " - title=`%s'", psz ); |
|---|
| 821 | | EnsureUTF8( psz ); |
|---|
| 822 | | asprintf( &p_sys->psz_title, psz ); |
|---|
| 823 | | free( psz ); |
|---|
| | 822 | p_sys->psz_title = psz; |
|---|
| 824 | 823 | i_skip -= i_len; |
|---|
| 825 | 824 | } |
|---|
| … | … | |
| 833 | 832 | psz[i_len] = '\0'; |
|---|
| 834 | 833 | |
|---|
| | 834 | EnsureUTF8( psz ); |
|---|
| 835 | 835 | msg_Dbg( p_demux, " - author=`%s'", psz ); |
|---|
| 836 | | EnsureUTF8( psz ); |
|---|
| 837 | | asprintf( &p_sys->psz_artist, psz ); |
|---|
| 838 | | free( psz ); |
|---|
| | 836 | p_sys->psz_artist = psz; |
|---|
| 839 | 837 | i_skip -= i_len; |
|---|
| 840 | 838 | } |
|---|
| … | … | |
| 848 | 846 | psz[i_len] = '\0'; |
|---|
| 849 | 847 | |
|---|
| | 848 | EnsureUTF8( psz ); |
|---|
| 850 | 849 | msg_Dbg( p_demux, " - copyright=`%s'", psz ); |
|---|
| 851 | | EnsureUTF8( psz ); |
|---|
| 852 | | asprintf( &p_sys->psz_copyright, psz ); |
|---|
| 853 | | free( psz ); |
|---|
| | 850 | p_sys->psz_copyright = psz; |
|---|
| 854 | 851 | i_skip -= i_len; |
|---|
| 855 | 852 | } |
|---|
| … | … | |
| 863 | 860 | psz[i_len] = '\0'; |
|---|
| 864 | 861 | |
|---|
| | 862 | EnsureUTF8( psz ); |
|---|
| 865 | 863 | msg_Dbg( p_demux, " - comment=`%s'", psz ); |
|---|
| 866 | | EnsureUTF8( psz ); |
|---|
| 867 | | asprintf( &p_sys->psz_description, psz ); |
|---|
| 868 | | free( psz ); |
|---|
| | 864 | p_sys->psz_description = psz; |
|---|
| 869 | 865 | i_skip -= i_len; |
|---|
| 870 | 866 | } |
|---|
| … | … | |
| 1049 | 1045 | psz[i_len] = '\0'; |
|---|
| 1050 | 1046 | |
|---|
| | 1047 | EnsureUTF8( psz ); |
|---|
| 1051 | 1048 | msg_Dbg( p_demux, " - title=`%s'", psz ); |
|---|
| 1052 | | EnsureUTF8( psz ); |
|---|
| 1053 | | asprintf( &p_sys->psz_title, psz ); |
|---|
| 1054 | | free( psz ); |
|---|
| | 1049 | p_sys->psz_title = psz; |
|---|
| 1055 | 1050 | } |
|---|
| 1056 | 1051 | p_peek += i_len; |
|---|
| … | … | |
| 1064 | 1059 | psz[i_len] = '\0'; |
|---|
| 1065 | 1060 | |
|---|
| | 1061 | EnsureUTF8( psz ); |
|---|
| 1066 | 1062 | msg_Dbg( p_demux, " - artist=`%s'", psz ); |
|---|
| 1067 | | EnsureUTF8( psz ); |
|---|
| 1068 | | asprintf( &p_sys->psz_artist, psz ); |
|---|
| 1069 | | free( psz ); |
|---|
| | 1063 | p_sys->psz_artist = psz; |
|---|
| 1070 | 1064 | } |
|---|
| 1071 | 1065 | p_peek += i_len; |
|---|
| … | … | |
| 1079 | 1073 | psz[i_len] = '\0'; |
|---|
| 1080 | 1074 | |
|---|
| | 1075 | EnsureUTF8( psz ); |
|---|
| 1081 | 1076 | msg_Dbg( p_demux, " - Copyright=`%s'", psz ); |
|---|
| 1082 | | EnsureUTF8( psz ); |
|---|
| 1083 | | asprintf( &p_sys->psz_copyright, psz ); |
|---|
| 1084 | | free( psz ); |
|---|
| | 1077 | p_sys->psz_copyright = psz; |
|---|
| 1085 | 1078 | } |
|---|
| 1086 | 1079 | p_peek += i_len; |
|---|
| … | … | |
| 1094 | 1087 | psz[i_len] = '\0'; |
|---|
| 1095 | 1088 | |
|---|
| | 1089 | EnsureUTF8( psz ); |
|---|
| 1096 | 1090 | msg_Dbg( p_demux, " - Comment=`%s'", psz ); |
|---|
| 1097 | | EnsureUTF8( psz ); |
|---|
| 1098 | | asprintf( &p_sys->psz_description, psz ); |
|---|
| 1099 | | free( psz ); |
|---|
| | 1091 | p_sys->psz_description = psz; |
|---|
| 1100 | 1092 | } |
|---|
| 1101 | 1093 | /* This might be unusefull */ |
|---|