Closed Bug 1248707 Opened 8 years ago Closed 8 years ago

Base64Encode() arguments are reversed in Base64.h

Categories

(Core :: XPCOM, defect)

45 Branch
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1240197

People

(Reporter: bkelly, Unassigned)

Details

These are the declaration in Base64.h:

  nsresult
  Base64Encode(const nsACString& aString, nsACString& aBinary);
  nsresult
  Base64Encode(const nsAString& aString, nsAString& aBinaryData);

Note that string is first and binary data is second.

This is the definition in Base64.cpp:

  nsresult
  Base64Encode(const nsACString& aBinaryData, nsACString& aString)
  nsresult
  Base64Encode(const nsAString& aString, nsAString& aBinaryData)

Note that the nsACString version has binary data first and the string second.

The nsAString version calls the nsACString version.  Luckily all of the nsAString consumers ignore the advertised signature and pass the binary data first.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.