syntax.pl patch
- Date: Wed, 23 Nov 1994 15:03:22 +0100
Folks,
I found a bug in syntax.pl where an illegal regular expression in a
maintainer object can crash dbupdate. The patch below solves this.
-Marten
*** /ncc/dbase/src/syntax.pl Thu Nov 17 14:38:29 1994
--- syntax.pl Wed Nov 23 14:56:06 1994
***************
*** 1,8 ****
#
# $RCSfile: syntax.pl,v $
! # $Revision: 0.46 $
# $Author: marten $
! # $Date: 1994/11/17 13:38:27 $
#
# ARGUMENTS: *ASSOC object
# RETURNS: INTEGER object_status
--- 1,8 ----
#
# $RCSfile: syntax.pl,v $
! # $Revision: 0.47 $
# $Author: marten $
! # $Date: 1994/11/23 13:56:05 $
#
# ARGUMENTS: *ASSOC object
# RETURNS: INTEGER object_status
***************
*** 512,519 ****
} else {
return;
}
! }
! elsif ($authstr[0] ne "MAIL-FROM") {
return $O_ERROR, "syntax error in \"$ATTL{$key}\" $value";
}
return;
--- 512,530 ----
} else {
return;
}
! }
! elsif ($authstr[0] eq "MAIL-FROM") {
! local($regex) = $value;
! $regex =~ s/^\s*MAIL\-FROM\s*//;
! eval "/$regex/;";
! if ($@) {
! return $O_ERROR, "\"$regex\" is not a legal regular expression";
! } else {
! return;
! }
! }
!
! else {
return $O_ERROR, "syntax error in \"$ATTL{$key}\" $value";
}
return;