[Bug 15617] New: Limit size of hour spec in timestamps

https://www.w3.org/Bugs/Public/show_bug.cgi?id=15617

           Summary: Limit size of hour spec in timestamps
           Product: TextTracks CG
           Version: unspecified
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebVTT
        AssignedTo: ian@hixie.ch
        ReportedBy: silviapfeiffer1@gmail.com
         QAContact: dave.null@w3.org
                CC: mike@w3.org, public-texttracks@w3.org


The WebVTT parser is rather lenient in what it allows for the hour
specification:

"Optionally (required if hour is non-zero):
1. Two or more characters in the range U+0030 DIGIT ZERO (0) to U+0039 DIGIT
NINE (9), representing the hours as a base ten integer.
2. A U+003A COLON character (:)"

It would be helpful to specify an implementation limit to ensure uniform
rejection of "large" timestamps across browsers and other WebVTT tools.

The question thus is: what are browser implementers using to store the
timestamp in.

If a unsigned long int is used, we are limited to about 1193 hours
(=(2**32-1)/1000.0/3600), so having the parser reject hours that are lager than
3 digits makes sure that we don't overflow.

If a double is used, we can correctly represent about 1,250,999,896 hours
(=(2**52-1)/1000.0/3600), i.e. 9 digits, which gives us a 142K years limit.

So it should be either 9 or 3, but we should provide a limit within which
implementations are expected to be correct.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

Received on Thursday, 19 January 2012 03:39:10 UTC