Browse Prior Art Database

Data truncation flag Disclosure Number: IPCOM000236872D
Publication Date: 2014-May-20
Document File: 1 page(s) / 32K

Publishing Venue

The Prior Art Database


This article describes methods for making a determination as to whether a string that has been shortened has been truncated (to conform to output limits for instance) or if a particular character range has been extracted.

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 82% of the total text.

Page 01 of 1

Data truncation flag

Data is often truncated in software - for instance in logging / trace it is common practice to reduce the amount of data output to file / display. However, if a user is not aware of the limit then it can cause confusion. An additional trace output to state that the data has been truncated would remove the confusion - however, this can be overlooked.

    Taking the string "AAAABBBBCCCCDDDDEEEE" as an example, a substring could be made to either truncate the data (to conform to output limits to stop logs from being filled with unnecessary data for instance) or extract a particular set of characters. For example:

String myString = "AAAABBBBCCCCDDDDEEEE"; myString.substring(0,10);

// Truncate the string to conform to 10 character limits: "AAAABBBBCC" myString.substring(0, myString.indexOf("C")); // Extract particular set of characters: "AAAABBBBC".

    Data truncation will typically take the form of a static size substring from the first character. Reviewing the stack at the point the string is modified, and using statistical analysis / thresholds, a user can make a determination if a set size is being enforced on the string from a given point in the code, or whether a more dynamic size modification is being applied. If dynamic, typically, data is not being truncated, it is more likely that relevant data is being extracted, otherwise we are potentially truncating the string to impose a size limitation.

    This determination can then be made available to th...