[llvm] r203745 - MC: fix possible NULL pointer dereference
Duncan P. N. Exon Smith
dexonsmith at apple.com
Sat Mar 15 15:38:00 PDT 2014
On 2014 Mar 12, at 19:09, Saleem Abdulrasool <compnerd at compnerd.org> wrote:
> Author: compnerd
> Date: Wed Mar 12 21:09:51 2014
> New Revision: 203745
>
> URL: http://llvm.org/viewvc/llvm-project?rev=203745&view=rev
> Log:
> MC: fix possible NULL pointer dereference
>
> Avoid NULL pointer scenario found via clang's static analyzer.
>
> Modified:
> llvm/trunk/lib/MC/MCParser/AsmParser.cpp
>
> Modified: llvm/trunk/lib/MC/MCParser/AsmParser.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCParser/AsmParser.cpp?rev=203745&r1=203744&r2=203745&view=diff
> ==============================================================================
> --- llvm/trunk/lib/MC/MCParser/AsmParser.cpp (original)
> +++ llvm/trunk/lib/MC/MCParser/AsmParser.cpp Wed Mar 12 21:09:51 2014
> @@ -2005,7 +2005,7 @@ bool AsmParser::parseMacroArguments(cons
> if (FAI >= NParameters) {
> Error(IDLoc,
> "parameter named '" + FA.Name + "' does not exist for macro '" +
> - M->Name + "'");
> + (M ? M->Name : "<unamed>") + "'”);
Typo here: unamed should probably be spelled unnamed.
> return true;
> }
> PI = FAI;
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list