trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #644: Trafodion 1788
Date Wed, 10 Aug 2016 16:28:35 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/644#discussion_r74279408
  
    --- Diff: core/sql/common/ComViewColUsage.h ---
    @@ -67,7 +88,9 @@ class ComViewColUsage
     
       void packUsage (NAString &viewColUsageStr)
       {
    -      char buf[sizeof(Int64)*2 + sizeof(Int32)*3 + 100];
    +      // usage contains 2 int64 and 3 int32, 100 chars is big enough to hold 
    +      // the string representation
    +      char buf[100];
    --- End diff --
    
    I count 47 for the text ("viewUID: ..." etc.), 20 for each of the int64's and 11 for each
of the int32s. That adds up to 47 + 40 + 33 = 120, + 1 for the null terminator. Seems like
buf needs to be at least 121. Sorry, I should have made this calculation more explicit when
I commented earlier.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message