Closed Bug 423964 Opened 13 years ago Closed 13 years ago

Uninitialized var used in StorageUnicodeFunctions::likeFunction

Categories

(Toolkit :: Storage, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dveditz, Assigned: dveditz)

References

Details

Attachments

(1 file)

The variable "E" (escape character) is used uninitialized when StorageUnicodeFunctions::likeFunction() is called with only two arguments, which seems to be how we use it because it tripped a run-time error in my debug build.

http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/storage/src/mozStorageUnicodeFunctions.cpp&rev=1.3&mark=198,200,209#191

I assume we can initialize this to 0 so it doesn't match anything?
Attached patch initialize 'E'Splinter Review
Bug is probably not a big deal, but I'd like it checked in to squash the annoying run-time error I get in debug builds.

It's old code but I haven't seen this particular warning before now. Did we just start using this method recently (or the two-arg form of it)?
Attachment #310584 - Flags: review?(sdwilsh)
Attachment #310584 - Flags: approval1.9?
Comment on attachment 310584 [details] [diff] [review]
initialize 'E'

is 0 right, or should we be using nsnull there?  Either way, r=sdwilsh

I suspect that this is the same as bug 420164 as well?
Attachment #310584 - Flags: review?(sdwilsh) → review+
Comment on attachment 310584 [details] [diff] [review]
initialize 'E'

a1.9=beltzner
Attachment #310584 - Flags: approval1.9? → approval1.9+
We should have been using the two arg version for a while now, so I'm not sure why you hadn't seen it before.
Checked in
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Duplicate of this bug: 420164
You need to log in before you can comment on or make changes to this bug.