File tree Expand file tree Collapse file tree 1 file changed +13
-9
lines changed
Expand file tree Collapse file tree 1 file changed +13
-9
lines changed Original file line number Diff line number Diff line change @@ -3187,21 +3187,25 @@ PHP_FUNCTION(imap_fetch_overview)
31873187}
31883188/* }}} */
31893189
3190- static bool header_injection (zend_string * str , bool adrlist )
3190+ static bool header_injection (const zend_string * str , bool adrlist )
31913191{
3192- char * p = ZSTR_VAL (str );
3192+ const char * p = ZSTR_VAL (str );
31933193
31943194 while ((p = strpbrk (p , "\r\n" )) != NULL ) {
3195- if (!(p [0 ] == '\r' && p [1 ] == '\n' )
3196- /* adrlists do not support folding, but swallow trailing line breaks */
3197- && !((adrlist && p [1 ] == '\0' )
3198- /* other headers support folding */
3199- || (!adrlist && (p [1 ] == ' ' || p [1 ] == '\t' )))) {
3200- return 1 ;
3195+ if (
3196+ !(p [0 ] == '\r' && p [1 ] == '\n' )
3197+ /* adrlists do not support folding, but swallow trailing line breaks */
3198+ && !(
3199+ (adrlist && p [1 ] == '\0' )
3200+ /* other headers support folding */
3201+ || (!adrlist && (p [1 ] == ' ' || p [1 ] == '\t' ))
3202+ )
3203+ ) {
3204+ return true;
32013205 }
32023206 p ++ ;
32033207 }
3204- return 0 ;
3208+ return false ;
32053209}
32063210
32073211/* {{{ Create a MIME message based on given envelope and body sections */
You can’t perform that action at this time.
0 commit comments