OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg | 2 * Copyright (C) 1998-2004 David Turner and Werner Lemberg |
3 * Copyright (C) 2006 Behdad Esfahbod | 3 * Copyright (C) 2006 Behdad Esfahbod |
4 * Copyright (C) 2007 Red Hat, Inc. | 4 * Copyright (C) 2007 Red Hat, Inc. |
5 * | 5 * |
6 * This is part of HarfBuzz, an OpenType Layout engine library. | 6 * This is part of HarfBuzz, an OpenType Layout engine library. |
7 * | 7 * |
8 * Permission is hereby granted, without written agreement and without | 8 * Permission is hereby granted, without written agreement and without |
9 * license or royalty fees, to use, copy, modify, and distribute this | 9 * license or royalty fees, to use, copy, modify, and distribute this |
10 * software and its documentation for any purpose, provided that the | 10 * software and its documentation for any purpose, provided that the |
(...skipping 5153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5164 return error; | 5164 return error; |
5165 | 5165 |
5166 /* Note: The coverage table in format 2 doesn't give an index into | 5166 /* Note: The coverage table in format 2 doesn't give an index into |
5167 anything. It just lets us know whether or not we need to | 5167 anything. It just lets us know whether or not we need to |
5168 do any lookup at all. */ | 5168 do any lookup at all. */ |
5169 | 5169 |
5170 error = _HB_OPEN_Coverage_Index( &ccpf2->Coverage, IN_CURGLYPH(), &index ); | 5170 error = _HB_OPEN_Coverage_Index( &ccpf2->Coverage, IN_CURGLYPH(), &index ); |
5171 if ( error ) | 5171 if ( error ) |
5172 return error; | 5172 return error; |
5173 | 5173 |
| 5174 if (ccpf2->MaxInputLength < 1) |
| 5175 return HB_Err_Not_Covered; |
| 5176 |
5174 if ( ALLOC_ARRAY( backtrack_classes, ccpf2->MaxBacktrackLength, HB_UShort ) ) | 5177 if ( ALLOC_ARRAY( backtrack_classes, ccpf2->MaxBacktrackLength, HB_UShort ) ) |
5175 return error; | 5178 return error; |
5176 known_backtrack_classes = 0; | 5179 known_backtrack_classes = 0; |
5177 | 5180 |
5178 if (ccpf2->MaxInputLength < 1) | |
5179 return HB_Err_Not_Covered; | |
5180 | |
5181 if ( ALLOC_ARRAY( input_classes, ccpf2->MaxInputLength, HB_UShort ) ) | 5181 if ( ALLOC_ARRAY( input_classes, ccpf2->MaxInputLength, HB_UShort ) ) |
5182 goto End3; | 5182 goto End3; |
5183 known_input_classes = 1; | 5183 known_input_classes = 1; |
5184 | 5184 |
5185 if ( ALLOC_ARRAY( lookahead_classes, ccpf2->MaxLookaheadLength, HB_UShort ) ) | 5185 if ( ALLOC_ARRAY( lookahead_classes, ccpf2->MaxLookaheadLength, HB_UShort ) ) |
5186 goto End2; | 5186 goto End2; |
5187 known_lookahead_classes = 0; | 5187 known_lookahead_classes = 0; |
5188 | 5188 |
5189 error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, IN_CURGLYPH(), | 5189 error = _HB_OPEN_Get_Class( &ccpf2->InputClassDef, IN_CURGLYPH(), |
5190 &input_classes[0], NULL ); | 5190 &input_classes[0], NULL ); |
(...skipping 894 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6085 { | 6085 { |
6086 error = Position_CursiveChain ( buffer ); | 6086 error = Position_CursiveChain ( buffer ); |
6087 if ( error ) | 6087 if ( error ) |
6088 return error; | 6088 return error; |
6089 } | 6089 } |
6090 | 6090 |
6091 return retError; | 6091 return retError; |
6092 } | 6092 } |
6093 | 6093 |
6094 /* END */ | 6094 /* END */ |
OLD | NEW |