Commit Graph

51711 Commits

Author SHA1 Message Date
Guy Harris 205a9f9b50 Use tvb_get_string_enc() rather than tvb_get_string(); according to
TIA/EIA-637-A, call-back numbers are either BCD or ASCII.

svn path=/trunk/; revision=54917
2014-01-22 22:37:08 +00:00
Martin Kaiser fc586507ba use tvb_get_string_enc()
svn path=/trunk/; revision=54916
2014-01-22 22:34:46 +00:00
Martin Kaiser a592b6af9f BASE_NONE -> STR_ASCII
svn path=/trunk/; revision=54915
2014-01-22 22:29:54 +00:00
Martin Kaiser 0f44a72088 use tvb_get_string_enc(), the strings are 7-bit ascii
svn path=/trunk/; revision=54914
2014-01-22 22:28:27 +00:00
Martin Kaiser 0c44ca6825 BASE_NONE -> STR_ASCII
svn path=/trunk/; revision=54913
2014-01-22 22:23:22 +00:00
Martin Kaiser 6d85633b15 edonkey seems to use 7-bit ascii for its tags etc
(not sure about one item that could contain arbitrary data...)

svn path=/trunk/; revision=54912
2014-01-22 22:20:16 +00:00
Martin Kaiser 28a5c66d0a no need for if(tree)
svn path=/trunk/; revision=54911
2014-01-22 21:57:42 +00:00
Guy Harris 222296999b Use tvb_get_string_enc() with appropriate encodings rather than
tvb_get_string().  (Some versions of the spec speak of ISO 8859-15
strings as well as UTF-8 strings, but we don't appear to try to handle
those.)

Update spec URL.

svn path=/trunk/; revision=54910
2014-01-22 20:51:56 +00:00
Guy Harris dd8cf3de90 Use tvb_get_string_enc(), and assume ASCII for E.164 addresses. (I must
be misreading Q.2630.3, as it seems to indicate that the addresses are
BCD, not ASCII, speaking as it does of "hexadecimal digit[s] of
address[es]".

svn path=/trunk/; revision=54909
2014-01-22 20:29:47 +00:00
Guy Harris 2019647757 At least according to
http://web.archive.org/web/20080308233204/http://dev.aol.com/aim/oscar/#SNAC

"In general strings are not NULL terminated and are encoded using UTF8."

It also says

	Authentication

	Over the years, the AIM backend has supported several different
	methods for authentication. ...

	When a client collects the loginId and password for the user it
	should not normalize them in any manner.  It also should not
	prevent the user from entering certain characters as the AIM
	name space is constantly changing.  For example, currently the
	AIM name space is ASCII based, but in the future that may
	change.  In general, the client should not perform input
	checking and instead allow the backend to reject bad values.

which also suggests not assuming ASCII.

So use ENC_UTF_8 in most cases.

For actual messages, it says:

	An IM can be encoded in the following different forms:

	Name	Value	Notes
	ASCII	0	ANSI ASCII -- ISO 646
	UNICODE	2	ISO 10646.USC-2 Unicode
	LATIN_1	3	ISO 8859-1

so, if that's the case, the dissector should choose beween
ENC_ASCII|ENC_NA, ENC_UCS_2|ENC_appropriate_ENDIAN, and
ENC_ISO_8859_1|ENC_NA.

Use tvb_get_string_enc() with an encoding rather than tvb_get_string().

svn path=/trunk/; revision=54908
2014-01-22 20:05:17 +00:00
Guy Harris 76131de4ab Update introductory comment to have correct file name.
svn path=/trunk/; revision=54907
2014-01-22 19:46:20 +00:00
Guy Harris 07f22ffd40 Use tvb_get_string_enc() rather than tvb_get_string().
XXX - if we supported various MacXXX character encodings, we could use
those; that might require a preference to specify the encoding.

svn path=/trunk/; revision=54906
2014-01-22 19:31:03 +00:00
Gerald Combs 2b26c1e216 Prepare for Git migration.
Mass-replace "svn" with "git". Add commented code to use git to fetch
the repository version.

svn path=/trunk/; revision=54905
2014-01-22 18:15:44 +00:00
Guy Harris 6b7fc8f0ef Use tvb_get_string_enc() with an explicit encoding, and assume ASCII.
Fix the encoding argument to proto_tree_add_item() calls that add
strings.

svn path=/trunk/; revision=54904
2014-01-22 10:39:59 +00:00
Guy Harris 6e70ecddaa Fetch strings using tvb_get_string_enc() and the appropriate encoding.
svn path=/trunk/; revision=54903
2014-01-22 07:55:06 +00:00
Alexis La Goutte a3fee176d4 Fix Dead Store (Dead assignement/Dead increment) warning found by Clang
svn path=/trunk/; revision=54902
2014-01-22 07:49:48 +00:00
Alexis La Goutte a5e795812b Fix encoding arg (found by encoding arg tools)
svn path=/trunk/; revision=54901
2014-01-22 07:49:40 +00:00
Alexis La Goutte 923c5b3b86 Fix the second argument of some proto_item_add_subtree (function : dissect_vendor_tr111_suboption and dissect_vendor_cl_suboption)
It is a ett variable no hf variable

svn path=/trunk/; revision=54900
2014-01-22 07:49:31 +00:00
Guy Harris 90e6423c38 I don't see any specification of how a H221NonStandardIdentifier is
encoded, but let's say it's pure ASCII for now.

svn path=/trunk/; revision=54899
2014-01-22 07:33:57 +00:00
Anders Broman ee88d38b4e Add a SCTP port range preference.
svn path=/trunk/; revision=54898
2014-01-22 06:13:17 +00:00
Anders Broman 31116b5a6b Remove unused entity.
svn path=/trunk/; revision=54897
2014-01-22 06:09:42 +00:00
Guy Harris d262ff8789 Use tvb_get_string_enc() with an explicit encoding; it's a + or a -, so
just treat it as ASCII.

svn path=/trunk/; revision=54896
2014-01-22 04:53:43 +00:00
Guy Harris 9ec41e3db2 The stuff you get from dissect_cbs_data() is UTF-8 encoded; treat it as
such.

Replace proto_tree_add_string(..., tvb_get_string_enc(same ...,
ENC_xxx)) with proto_tree_add_item(..., ENC_xxx).

svn path=/trunk/; revision=54895
2014-01-22 04:50:23 +00:00
Guy Harris d85bca8969 Another probably-wrong tvb_get_string().
Also, add a URL for the PKCS #12 spec.

svn path=/trunk/; revision=54894
2014-01-22 04:39:31 +00:00
Guy Harris 051cb78cd9 To quote section B.5 "Keys for password integrity mode" of PKCS #12
v1.1: Personal Information Exchange Syntax:

	http://www.emc.com/emc-plus/rsa-labs/pkcs/files/h11301-wp-pkcs-12v1-1-personal-information-exchange-syntax.pdf

"When password integrity mode is used to protect a PFX PDU, a password
and salt are used to derive a MAC key.  As with password privacy mode,
the password is a Unicode string, and the salt is a byte string."

So, not having found any other references to salts as text strings, copy
it with tvb_memdup(), not tvb_get_string().

svn path=/trunk/; revision=54893
2014-01-22 04:27:15 +00:00
Guy Harris 19930d6f49 Clean up indentation and bracketing.
svn path=/trunk/; revision=54892
2014-01-22 04:14:05 +00:00
Guy Harris c85b34ed66 The strings in question are generated as UTF-8 from the CBS encoding, so
process them as such.

svn path=/trunk/; revision=54891
2014-01-22 04:13:37 +00:00
Guy Harris e163578906 Another tvb_get_string() replacement.
svn path=/trunk/; revision=54890
2014-01-22 02:41:13 +00:00
Guy Harris c12dc67752 Strings in LDAP are generally UTF-8, although if we treat something only
as a string if every byte in it is a printable ASCII character, it's
ASCII.  Use tvb_get_string_enc() with an appropriate encoding.

svn path=/trunk/; revision=54889
2014-01-22 02:37:45 +00:00
Guy Harris 5e0641f271 Use tvb_get_string_enc() with an explicit encoding.
svn path=/trunk/; revision=54886
2014-01-22 02:04:15 +00:00
Guy Harris e35ca75a68 It's one character, either + or -, hence ASCII.
svn path=/trunk/; revision=54885
2014-01-22 01:28:31 +00:00
Guy Harris a75657bbd6 It's not a string, it's a byte array (bit array, really).
Also, RFC 5035 isn't a complete ESS spec, it's an update to RFC 2634.

svn path=/trunk/; revision=54884
2014-01-22 01:22:01 +00:00
Bill Meier 9c953985a1 Clean up whitespace: use consistent indentation, etc;
Add editor modelines.

svn path=/trunk/; revision=54883
2014-01-22 01:10:31 +00:00
Guy Harris 90d7c5f59b Don't write out packets that have a "captured length" bigger than we're
willing to read or that's bigger than will fit in the file format;
instead, report an error.

For the "I can't write a packet of that type in that file type" error,
report the file type in question.

svn path=/trunk/; revision=54882
2014-01-22 00:26:36 +00:00
Martin Kaiser 5c825d6a36 mp4 box type is always a 7bit ascii string
svn path=/trunk/; revision=54881
2014-01-21 22:16:05 +00:00
Guy Harris ddb966fb2f The file's name has a lower-case "p" in "9p".
svn path=/trunk/; revision=54880
2014-01-21 20:13:40 +00:00
Guy Harris 87f4b376f1 Fix one half-changed tvb_get_string() call.
svn path=/trunk/; revision=54879
2014-01-21 20:13:17 +00:00
Guy Harris 4eb619b677 Always combine ENC_UTF_8 with ENC_NA.
svn path=/trunk/; revision=54878
2014-01-21 20:12:48 +00:00
Guy Harris 73598a7991 IA5 = ASCII. Use tvb_get_string_enc() with an explicit encoding, not
tvb_get_string().

svn path=/trunk/; revision=54877
2014-01-21 20:08:39 +00:00
Guy Harris 4b02416cc9 9p strings are, not surprisingly, encoded using UTF-8; replace
tvb_get_string() calls with tvb_get_string_enc() calls explicitly
specifying UTF-8.

svn path=/trunk/; revision=54876
2014-01-21 19:53:52 +00:00
Evan Huus f4ab2b2b00 Harden nfs_name_snoop_add_name against various malformed inputs. Thanks to Moshe
Kaplan for the report.

Fixes https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9672 and some
other cases in the same vein.

svn path=/trunk/; revision=54875
2014-01-21 18:48:01 +00:00
Guy Harris 4d9475e4ef Get rid of tvb_get_faked_unicode() - tvb_get_string_enc() does the job
better.

We don't need eventlog_get_unicode_string_length() in the eventlog
dissector, either - tvb_unicode_strsize() does the job just as well.

svn path=/trunk/; revision=54874
2014-01-21 09:56:34 +00:00
Pascal Quantin 35d0d0f1ae From Igor Slepchin via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9675 :
RMT LCT dissector doesn't display 48-bit TOIs and TSIs properly

svn path=/trunk/; revision=54873
2014-01-21 08:59:47 +00:00
Guy Harris 8f8eeb5dce Check the return of wtap_dump_close() even if we've gotten a read error;
the only reason not to check it is if we've already gotten a write error
and another write error would be superfluous (either "you got two of the
same error" or "you got an I/O error *and* you ran out of disk
space/disk quota" is of limited interest).

Discard the return value of wtap_dump_close() in the case where we've
already gotten a write error, in the hopes of squelching a Coverity
warning.

svn path=/trunk/; revision=54872
2014-01-21 08:50:35 +00:00
Bill Meier 0bc06ee3ab - Remove unneeded #includes;
- "Once-only" test not needed in proto_reg_handoff..();
- Set COL_PROTOCOL, clear COL_INFO at the begining of the dissector
   before fetching data from the tvb;
- Use tvb_reported_length;
- Use col_set_str/col_append_str where appropriate;
- Zigbee --> lwm;
- Fix typo;
- Reformat some whitespace for consistency.

ToDo:
- Review use of col_...() and expert...() under 'if (tree)';
- Review use of col_clear(..., COL_INFO) after text already added to COL_INFO;
- Review certain tvb fetches to ensure  no fetches using a negative offset;

svn path=/trunk/; revision=54871
2014-01-21 02:32:48 +00:00
Guy Harris 45d5b74219 Fix declaration of tvb_get_string().
svn path=/trunk/; revision=54870
2014-01-21 01:44:58 +00:00
Bill Meier c540e33c49 Add properties ....
svn path=/trunk/; revision=54869
2014-01-21 01:24:13 +00:00
Guy Harris 9cdf8dd5f5 Don't do the byte-with-8th-bit-set-to-REPLACEMENT-CHARACTER mapping for
UTF-8 strings.

Add that mapping for null-terminated ASCII strings.

Factor out some common parts of comments about string routines, and
clean up some other comments.

svn path=/trunk/; revision=54868
2014-01-21 01:23:29 +00:00
Martin Kaiser 6517e3ba4b don't use tvb_get_string(..., len) to get exactly len raw bytes
from a tvbuff

svn path=/trunk/; revision=54867
2014-01-20 23:30:01 +00:00
Martin Kaiser ae82a1cafe make MMI strings filterable
svn path=/trunk/; revision=54866
2014-01-20 22:06:19 +00:00