United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6615248 SCCS tag interpetation makes code invalid
JDK-6615248 : SCCS tag interpetation makes code invalid

Details
Type:
Bug
Submit Date:
2007-10-10
Status:
Resolved
Updated Date:
2011-03-30
Project Name:
JDK
Resolved Date:
2008-05-01
Component:
core-svc
OS:
solaris_9,linux,generic,solaris_10
Sub-Component:
tools
CPU:
x86,sparc,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
5.0,5.0u14,5.0u15
Fixed Versions:
5.0u15-rev (b11)

Related Reports
Backport:
Backport:
Duplicate:
Relates:

Sub Tasks

Description
SCCS tag interpetation makes code invalid after checkin into ws.

                                    

Comments
SUGGESTED FIX

115d115
<           char dformat[14];
121,129c121
< 
<           memset(dformat, 0, 14);
<           strcat(dformat, "%Y");
<           strcat(dformat, "%m");
<           strcat(dformat, "%d.");
<           strcat(dformat, "%H");
<           strcat(dformat, "%M");
<           strcat(dformat, "%S");
<           time_length = strftime(time_string, buffer_size, dformat, today);
---
>           time_length = strftime(time_string, buffer_size, "m%d.06/27/07M%S", today);
                                     
2007-10-10
EVALUATION

Date format string %Y%m%d.%H%M%S  is treated wrongly during sccs delget process.
Need to construct the date format string differently to bypass sccs interpretation.
                                     
2007-10-10
SUGGESTED FIX

Much simpler fix:

 time_length = strftime(time_string, buffer_size, "%Y""%m%d.%H""%M%S", today);

the problematic %x% sequences are broken so SCCS won't replace them, but the adjacent string literals are recombined into the original string literal.
                                     
2007-10-10
SUGGESTED FIX

Still we can see sccs interprets this tag so

time_length = strftime(time_string, buffer_size, "%Y""%m""%d.%H""%M""%S", today);

think would be the best one.
                                     
2007-10-10



Hardware and Software, Engineered to Work Together