]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Unbounded access to fxStr nsf. Bug reported by Toki Barron, fix contributed
authorDarren Nickerson <darren.nickerson@ifax.com>
Thu, 29 Jun 2000 23:33:47 +0000 (23:33 +0000)
committerDarren Nickerson <darren.nickerson@ifax.com>
Thu, 29 Jun 2000 23:33:47 +0000 (23:33 +0000)
by Aidan Van Dyk <aidan@highrise.ca>.

faxd/NSF.c++

index afefc5f0e4295a1432f8a9f12cd3fffb1d16a276..f4f54c4ca4d969a8d627e530fbd591d13abdbb7c 100644 (file)
@@ -144,6 +144,8 @@ void NSF::loadRawData( const u_char* rawData, int size, const u_char* revTab )
 
 void NSF::decode()
 {
+    if ( nsf.length() == 0 )
+       return;
     for( const NSFData* p = KnownNSF; p->vendorId; p++ ){
         if( !memcmp( p->vendorId, &nsf[0], p->vendorIdSize ) ){
             if (p->vendorName != 0) {