Fix handling of -offset and -length in asn1parse tool.
authorDr. Stephen Henson <steve@openssl.org>
Sun, 8 Feb 2004 13:30:33 +0000 (13:30 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Sun, 8 Feb 2004 13:30:33 +0000 (13:30 +0000)
commitdd10343e7555c790774cfbdd91c2373f6c0ae627
treec630c2e4c3a15aa2a6416d036f2bca252381595c
parentad5550209241f4c01881c1b786eabca99c696031
Fix handling of -offset and -length in asn1parse tool.

If -offset exceeds -length of data available exit with an error.

Don't read past end of total data available when -offset supplied.

If -length exceeds total available truncate it.
apps/asn1pars.c