mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 00:45:28 +02:00
many fixes see ChangeLog
This commit is contained in:
parent
77b8eab7a4
commit
dad0f57455
4 changed files with 18 additions and 5 deletions
|
@ -1,3 +1,13 @@
|
|||
2002-11-06 David Inglis
|
||||
* index/org/eclipse/cdt/internal/core/index/CTagsRunner.java
|
||||
fixed NPE when projects are deleted.
|
||||
|
||||
* src/org/eclipse/cdt/core/ErrorParserManager.java
|
||||
fixed NPE when file exits outside of workspace
|
||||
|
||||
* utils/org/eclipse/cdt/utils/elf/Elf.java
|
||||
fixed out of memory failure on bad elf files
|
||||
|
||||
2002-11-06 Alain Magloire
|
||||
|
||||
Deal with some issues of PR 25756.
|
||||
|
|
|
@ -13,6 +13,7 @@ import java.util.Map;
|
|||
import org.eclipse.core.resources.IFile;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
||||
import org.eclipse.cdt.core.index.ITagEntry;
|
||||
|
||||
|
@ -52,9 +53,11 @@ public class CTagsRunner implements Runnable {
|
|||
try {
|
||||
CTagsCmd cmd = new CTagsCmd();
|
||||
IFile file = (IFile)resource;
|
||||
String location = file.getLocation().toOSString();
|
||||
ITagEntry[] entries = cmd.getTagEntries(file, location);
|
||||
filesMap.put(resource.getLocation(), entries);
|
||||
IPath path = file.getLocation();
|
||||
if (path != null) {
|
||||
ITagEntry[] entries = cmd.getTagEntries(file, path.toOSString());
|
||||
filesMap.put(resource.getLocation(), entries);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
}
|
||||
//System.out.println("indexing " + resource.getName());
|
||||
|
|
|
@ -273,7 +273,7 @@ public class ErrorParserManager extends OutputStream {
|
|||
path = (IPath) getWorkingDirectory().append(filePath);
|
||||
}
|
||||
IFile file = (path.isAbsolute()) ? fProject.getWorkspace().getRoot().getFileForLocation(path) : fProject.getFile(path);
|
||||
return (file.exists()) ? file : null;
|
||||
return (file != null && file.exists()) ? file : null;
|
||||
}
|
||||
|
||||
protected class Problem {
|
||||
|
|
|
@ -166,7 +166,7 @@ public class Elf {
|
|||
try {
|
||||
if ( section_strtab == null ) {
|
||||
int size = (int)sections[ehdr.e_shstrndx].sh_size;
|
||||
if ( size > efile.length() )
|
||||
if ( size <= 0 || size > efile.length() )
|
||||
return EMPTY_STRING;
|
||||
section_strtab = new byte[size];
|
||||
efile.seek(sections[ehdr.e_shstrndx].sh_offset);
|
||||
|
|
Loading…
Add table
Reference in a new issue