idx int64 | func_before string | Vulnerability Classification string | vul int64 | func_after string | patch string | CWE ID string | lines_before string | lines_after string |
|---|---|---|---|---|---|---|---|---|
7,900 | bool Part::saveFile()
{
return true;
}
| Exec Code | 0 | bool Part::saveFile()
{
return true;
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,901 | void Part::selectionChanged()
{
m_infoPanel->setIndexes(m_view->selectionModel()->selectedRows());
}
| Exec Code | 0 | void Part::selectionChanged()
{
m_infoPanel->setIndexes(m_view->selectionModel()->selectedRows());
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,902 | void Part::setFileNameFromArchive()
{
const QString prettyName = url().fileName();
m_infoPanel->setPrettyFileName(prettyName);
m_infoPanel->updateWithDefaults();
emit setWindowCaption(prettyName);
}
| Exec Code | 0 | void Part::setFileNameFromArchive()
{
const QString prettyName = url().fileName();
m_infoPanel->setPrettyFileName(prettyName);
m_infoPanel->updateWithDefaults();
emit setWindowCaption(prettyName);
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,903 | void Part::setReadyGui()
{
QApplication::restoreOverrideCursor();
m_busy = false;
if (m_statusBarExtension->statusBar()) {
m_statusBarExtension->statusBar()->hide();
}
m_view->setEnabled(true);
updateActions();
}
| Exec Code | 0 | void Part::setReadyGui()
{
QApplication::restoreOverrideCursor();
m_busy = false;
if (m_statusBarExtension->statusBar()) {
m_statusBarExtension->statusBar()->hide();
}
m_view->setEnabled(true);
updateActions();
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,904 | void Part::setupActions()
{
m_signalMapper = new QSignalMapper(this);
m_showInfoPanelAction = new KToggleAction(i18nc("@action:inmenu", "Show Information Panel"), this);
actionCollection()->addAction(QStringLiteral( "show-infopanel" ), m_showInfoPanelAction);
m_showInfoPanelAction->setChecked(ArkSettin... | Exec Code | 0 | void Part::setupActions()
{
m_signalMapper = new QSignalMapper(this);
m_showInfoPanelAction = new KToggleAction(i18nc("@action:inmenu", "Show Information Panel"), this);
actionCollection()->addAction(QStringLiteral( "show-infopanel" ), m_showInfoPanelAction);
m_showInfoPanelAction->setChecked(ArkSettin... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,905 | void Part::setupView()
{
m_view->setContextMenuPolicy(Qt::CustomContextMenu);
m_view->setModel(m_model);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &Part::updateActions);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
... | Exec Code | 0 | void Part::setupView()
{
m_view->setContextMenuPolicy(Qt::CustomContextMenu);
m_view->setModel(m_model);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
this, &Part::updateActions);
connect(m_view->selectionModel(), &QItemSelectionModel::selectionChanged,
... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,906 | void Part::slotActivated(const QModelIndex &index)
{
Q_UNUSED(index)
if (QGuiApplication::keyboardModifiers() != Qt::ShiftModifier &&
QGuiApplication::keyboardModifiers() != Qt::ControlModifier) {
ArkSettings::defaultOpenAction() == ArkSettings::EnumDefaultOpenAction::Preview ? slotOpenEntry(Pr... | Exec Code | 0 | void Part::slotActivated(const QModelIndex &index)
{
Q_UNUSED(index)
if (QGuiApplication::keyboardModifiers() != Qt::ShiftModifier &&
QGuiApplication::keyboardModifiers() != Qt::ControlModifier) {
ArkSettings::defaultOpenAction() == ArkSettings::EnumDefaultOpenAction::Preview ? slotOpenEntry(Pr... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,907 | void Part::slotAddComment()
{
CommentJob *job = m_model->archive()->addComment(m_commentView->toPlainText());
if (!job) {
return;
}
registerJob(job);
job->start();
m_commentMsgWidget->hide();
if (m_commentView->toPlainText().isEmpty()) {
m_commentBox->hide();
}
}
| Exec Code | 0 | void Part::slotAddComment()
{
CommentJob *job = m_model->archive()->addComment(m_commentView->toPlainText());
if (!job) {
return;
}
registerJob(job);
job->start();
m_commentMsgWidget->hide();
if (m_commentView->toPlainText().isEmpty()) {
m_commentBox->hide();
}
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,908 | void Part::slotCommentChanged()
{
if (!m_model->archive()) {
return;
}
if (m_commentMsgWidget->isHidden() && m_commentView->toPlainText() != m_model->archive()->comment()) {
m_commentMsgWidget->animatedShow();
} else if (m_commentMsgWidget->isVisible() && m_commentView->toPlainText() ==... | Exec Code | 0 | void Part::slotCommentChanged()
{
if (!m_model->archive()) {
return;
}
if (m_commentMsgWidget->isHidden() && m_commentView->toPlainText() != m_model->archive()->comment()) {
m_commentMsgWidget->animatedShow();
} else if (m_commentMsgWidget->isVisible() && m_commentView->toPlainText() ==... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,909 | void Part::slotCopyFiles()
{
m_model->filesToCopy = ArchiveModel::entryMap(filesForIndexes(addChildren(m_view->selectionModel()->selectedRows())));
qCDebug(ARK) << "Entries marked to copy:" << m_model->filesToCopy.values();
foreach (const QModelIndex &row, m_cutIndexes) {
m_view->dataChanged(row, ro... | Exec Code | 0 | void Part::slotCopyFiles()
{
m_model->filesToCopy = ArchiveModel::entryMap(filesForIndexes(addChildren(m_view->selectionModel()->selectedRows())));
qCDebug(ARK) << "Entries marked to copy:" << m_model->filesToCopy.values();
foreach (const QModelIndex &row, m_cutIndexes) {
m_view->dataChanged(row, ro... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,910 | void Part::slotDeleteFiles()
{
const int selectionsCount = m_view->selectionModel()->selectedRows().count();
const auto reallyDelete =
KMessageBox::questionYesNo(widget(),
i18ncp("@info",
"Deleting this file is not undoable. Ar... | Exec Code | 0 | void Part::slotDeleteFiles()
{
const int selectionsCount = m_view->selectionModel()->selectedRows().count();
const auto reallyDelete =
KMessageBox::questionYesNo(widget(),
i18ncp("@info",
"Deleting this file is not undoable. Ar... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,911 | void Part::slotDeleteFilesDone(KJob* job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
}
m_cutIndexes.clear();
m_model->filesToMove.clear();
m_model->filesToCopy.clear();
}
| Exec Code | 0 | void Part::slotDeleteFilesDone(KJob* job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
}
m_cutIndexes.clear();
m_model->filesToMove.clear();
m_model->filesToCopy.clear();
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,912 | void Part::slotExtractArchive()
{
if (m_view->selectionModel()->selectedRows().count() > 0) {
m_view->selectionModel()->clear();
}
slotShowExtractionDialog();
}
| Exec Code | 0 | void Part::slotExtractArchive()
{
if (m_view->selectionModel()->selectedRows().count() > 0) {
m_view->selectionModel()->clear();
}
slotShowExtractionDialog();
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,913 | void Part::slotExtractionDone(KJob* job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
} else {
ExtractJob *extractJob = qobject_cast<ExtractJob*>(job);
Q_ASSERT(extractJob);
if (ArkSettings::openDestinationFolder... | Exec Code | 0 | void Part::slotExtractionDone(KJob* job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
} else {
ExtractJob *extractJob = qobject_cast<ExtractJob*>(job);
Q_ASSERT(extractJob);
if (ArkSettings::openDestinationFolder... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,914 | void Part::slotLoadingFinished(KJob *job)
{
if (job->error()) {
if (arguments().metaData()[QStringLiteral("createNewArchive")] != QLatin1String("true")) {
if (job->error() != KJob::KilledJobError) {
displayMsgWidget(KMessageWidget::Error, xi18nc("@info", "Loading the archive <fil... | Exec Code | 0 | void Part::slotLoadingFinished(KJob *job)
{
if (job->error()) {
if (arguments().metaData()[QStringLiteral("createNewArchive")] != QLatin1String("true")) {
if (job->error() != KJob::KilledJobError) {
displayMsgWidget(KMessageWidget::Error, xi18nc("@info", "Loading the archive <fil... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,915 | void Part::slotLoadingStarted()
{
m_model->filesToMove.clear();
m_model->filesToCopy.clear();
}
| Exec Code | 0 | void Part::slotLoadingStarted()
{
m_model->filesToMove.clear();
m_model->filesToCopy.clear();
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,916 | void Part::slotOpenEntry(int mode)
{
qCDebug(ARK) << "Opening with mode" << mode;
QModelIndex index = m_view->selectionModel()->currentIndex();
Archive::Entry *entry = m_model->entryForIndex(index);
if (entry->isDir()) {
return;
}
if (!entry->property("link").toString().isEmpty()) {
... | Exec Code | 0 | void Part::slotOpenEntry(int mode)
{
qCDebug(ARK) << "Opening with mode" << mode;
QModelIndex index = m_view->selectionModel()->currentIndex();
Archive::Entry *entry = m_model->entryForIndex(index);
if (entry->isDir()) {
return;
}
if (!entry->property("link").toString().isEmpty()) {
... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,917 | void Part::slotPasteFiles()
{
m_destination = (m_view->selectionModel()->selectedRows().count() > 0)
? m_model->entryForIndex(m_view->selectionModel()->currentIndex())
: Q_NULLPTR;
if (m_destination == Q_NULLPTR) {
m_destination = new Archive::Entry(Q_NULLPTR, QSt... | Exec Code | 0 | void Part::slotPasteFiles()
{
m_destination = (m_view->selectionModel()->selectedRows().count() > 0)
? m_model->entryForIndex(m_view->selectionModel()->currentIndex())
: Q_NULLPTR;
if (m_destination == Q_NULLPTR) {
m_destination = new Archive::Entry(Q_NULLPTR, QSt... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,918 | void Part::slotPasteFiles(QVector<Kerfuffle::Archive::Entry*> &files, Kerfuffle::Archive::Entry *destination, int entriesWithoutChildren)
{
if (files.isEmpty()) {
delete m_destination;
return;
}
QStringList filesPaths = ReadOnlyArchiveInterface::entryFullPaths(files);
QStringList newPat... | Exec Code | 0 | void Part::slotPasteFiles(QVector<Kerfuffle::Archive::Entry*> &files, Kerfuffle::Archive::Entry *destination, int entriesWithoutChildren)
{
if (files.isEmpty()) {
delete m_destination;
return;
}
QStringList filesPaths = ReadOnlyArchiveInterface::entryFullPaths(files);
QStringList newPat... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,919 | void Part::slotPasteFilesDone(KJob *job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
}
m_cutIndexes.clear();
m_model->filesToMove.clear();
m_model->filesToCopy.clear();
}
| Exec Code | 0 | void Part::slotPasteFilesDone(KJob *job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
}
m_cutIndexes.clear();
m_model->filesToMove.clear();
m_model->filesToCopy.clear();
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,920 | void Part::slotPreviewExtractedEntry(KJob *job)
{
if (!job->error()) {
PreviewJob *previewJob = qobject_cast<PreviewJob*>(job);
Q_ASSERT(previewJob);
m_tmpExtractDirList << previewJob->tempDir();
ArkViewer::view(previewJob->validatedFilePath());
} else if (job->error() != KJob:... | Exec Code | 0 | void Part::slotPreviewExtractedEntry(KJob *job)
{
if (!job->error()) {
PreviewJob *previewJob = qobject_cast<PreviewJob*>(job);
Q_ASSERT(previewJob);
m_tmpExtractDirList << previewJob->tempDir();
ArkViewer::view(previewJob->validatedFilePath());
} else if (job->error() != KJob:... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,921 | void Part::slotQuickExtractFiles(QAction *triggeredAction)
{
if (!triggeredAction->data().isNull()) {
QString userDestination = triggeredAction->data().toString();
QString finalDestinationDirectory;
const QString detectedSubfolder = detectSubfolder();
qCDebug(ARK) << "Detected subfol... | Exec Code | 0 | void Part::slotQuickExtractFiles(QAction *triggeredAction)
{
if (!triggeredAction->data().isNull()) {
QString userDestination = triggeredAction->data().toString();
QString finalDestinationDirectory;
const QString detectedSubfolder = detectSubfolder();
qCDebug(ARK) << "Detected subfol... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,922 | void Part::slotRenameFile(const QString &name)
{
if (name == QLatin1String(".") || name == QLatin1String("..") || name.contains(QLatin1Char('/'))) {
displayMsgWidget(KMessageWidget::Error, i18n("Filename can't contain slashes and can't be equal to \".\" or \"..\""));
return;
}
const Archive:... | Exec Code | 0 | void Part::slotRenameFile(const QString &name)
{
if (name == QLatin1String(".") || name == QLatin1String("..") || name.contains(QLatin1Char('/'))) {
displayMsgWidget(KMessageWidget::Error, i18n("Filename can't contain slashes and can't be equal to \".\" or \"..\""));
return;
}
const Archive:... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,923 | void Part::slotSaveAs()
{
QUrl saveUrl = QFileDialog::getSaveFileUrl(widget(), i18nc("@title:window", "Save Archive As"), url());
if ((saveUrl.isValid()) && (!saveUrl.isEmpty())) {
auto statJob = KIO::stat(saveUrl, KIO::StatJob::DestinationSide, 0);
KJobWidgets::setWindow(statJob, widget());
... | Exec Code | 0 | void Part::slotSaveAs()
{
QUrl saveUrl = QFileDialog::getSaveFileUrl(widget(), i18nc("@title:window", "Save Archive As"), url());
if ((saveUrl.isValid()) && (!saveUrl.isEmpty())) {
auto statJob = KIO::stat(saveUrl, KIO::StatJob::DestinationSide, 0);
KJobWidgets::setWindow(statJob, widget());
... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,924 | void Part::slotShowExtractionDialog()
{
if (!m_model) {
return;
}
QPointer<Kerfuffle::ExtractionDialog> dialog(new Kerfuffle::ExtractionDialog);
dialog.data()->setModal(true);
if (m_view->selectionModel()->selectedRows().count() > 0) {
dialog.data()->setShowSelectedFiles(true);
... | Exec Code | 0 | void Part::slotShowExtractionDialog()
{
if (!m_model) {
return;
}
QPointer<Kerfuffle::ExtractionDialog> dialog(new Kerfuffle::ExtractionDialog);
dialog.data()->setModal(true);
if (m_view->selectionModel()->selectedRows().count() > 0) {
dialog.data()->setShowSelectedFiles(true);
... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,925 | void Part::slotTestArchive()
{
TestJob *job = m_model->archive()->testArchive();
if (!job) {
return;
}
registerJob(job);
connect(job, &KJob::result, this, &Part::slotTestingDone);
job->start();
}
| Exec Code | 0 | void Part::slotTestArchive()
{
TestJob *job = m_model->archive()->testArchive();
if (!job) {
return;
}
registerJob(job);
connect(job, &KJob::result, this, &Part::slotTestingDone);
job->start();
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,926 | void Part::slotTestingDone(KJob* job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
} else if (static_cast<TestJob*>(job)->testSucceeded()) {
KMessageBox::information(widget(), i18n("The archive passed the integrity test."), i18n(... | Exec Code | 0 | void Part::slotTestingDone(KJob* job)
{
if (job->error() && job->error() != KJob::KilledJobError) {
KMessageBox::error(widget(), job->errorString());
} else if (static_cast<TestJob*>(job)->testSucceeded()) {
KMessageBox::information(widget(), i18n("The archive passed the integrity test."), i18n(... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,927 | void Part::slotToggleInfoPanel(bool visible)
{
if (visible) {
m_splitter->setSizes(ArkSettings::splitterSizes());
m_infoPanel->show();
} else {
ArkSettings::setSplitterSizes(m_splitter->sizes());
m_infoPanel->hide();
}
}
| Exec Code | 0 | void Part::slotToggleInfoPanel(bool visible)
{
if (visible) {
m_splitter->setSizes(ArkSettings::splitterSizes());
m_infoPanel->show();
} else {
ArkSettings::setSplitterSizes(m_splitter->sizes());
m_infoPanel->hide();
}
}
| @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,928 | void Part::slotWatchedFileModified(const QString& file)
{
qCDebug(ARK) << "Watched file modified:" << file;
QString relPath = file;
foreach (QTemporaryDir *tmpDir, m_tmpExtractDirList) {
relPath.remove(tmpDir->path()); //Remove tmpDir.
}
relPath = relPath.mid(1); //Remove leading slash.
... | Exec Code | 0 | void Part::slotWatchedFileModified(const QString& file)
{
qCDebug(ARK) << "Watched file modified:" << file;
QString relPath = file;
foreach (QTemporaryDir *tmpDir, m_tmpExtractDirList) {
relPath.remove(tmpDir->path()); //Remove tmpDir.
}
relPath = relPath.mid(1); //Remove leading slash.
... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,929 | void Part::updateActions()
{
bool isWritable = m_model->archive() && !m_model->archive()->isReadOnly();
const Archive::Entry *entry = m_model->entryForIndex(m_view->selectionModel()->currentIndex());
int selectedEntriesCount = m_view->selectionModel()->selectedRows().count();
const bool isEncryptedButU... | Exec Code | 0 | void Part::updateActions()
{
bool isWritable = m_model->archive() && !m_model->archive()->isReadOnly();
const Archive::Entry *entry = m_model->entryForIndex(m_view->selectionModel()->currentIndex());
int selectedEntriesCount = m_view->selectionModel()->selectedRows().count();
const bool isEncryptedButU... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,930 | void Part::updateQuickExtractMenu(QAction *extractAction)
{
if (!extractAction) {
return;
}
QMenu *menu = extractAction->menu();
if (!menu) {
menu = new QMenu();
extractAction->setMenu(menu);
connect(menu, &QMenu::triggered,
this, &Part::slotQuickExtract... | Exec Code | 0 | void Part::updateQuickExtractMenu(QAction *extractAction)
{
if (!extractAction) {
return;
}
QMenu *menu = extractAction->menu();
if (!menu) {
menu = new QMenu();
extractAction->setMenu(menu);
connect(menu, &QMenu::triggered,
this, &Part::slotQuickExtract... | @@ -988,7 +988,7 @@ void Part::slotOpenExtractedEntry(KJob *job)
} else {
KRun::runUrl(QUrl::fromUserInput(fullName, QString(), QUrl::AssumeLocalFile),
QMimeDatabase().mimeTypeForFile(fullName).name(),
- widget());
+ widget(... | CWE-78 | null | null |
7,931 | Chunk::Chunk(Container* parent, WEBP_MetaHandler* handler)
{
this->needsRewrite = (parent) ? parent->needsRewrite : false;
this->parent = parent;
XMP_IO* file = handler->parent->ioRef;
this->pos = file->Offset();
this->tag = XIO::ReadUns32_LE(file);
this->size = XIO::ReadUns32_LE(file);
... | null | 0 | Chunk::Chunk(Container* parent, WEBP_MetaHandler* handler)
{
this->needsRewrite = (parent) ? parent->needsRewrite : false;
this->parent = parent;
XMP_IO* file = handler->parent->ioRef;
this->pos = file->Offset();
this->tag = XIO::ReadUns32_LE(file);
this->size = XIO::ReadUns32_LE(file);
... | @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,932 | Chunk::Chunk(Container* parent, XMP_Uns32 tag)
: parent(parent), tag(tag)
{
this->needsRewrite = true;
}
| null | 0 | Chunk::Chunk(Container* parent, XMP_Uns32 tag)
: parent(parent), tag(tag)
{
this->needsRewrite = true;
}
| @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,933 | XMPChunk::XMPChunk(Container* parent)
: Chunk(parent, kChunk_XMP_)
{
this->size = 0;
}
| null | 0 | XMPChunk::XMPChunk(Container* parent)
: Chunk(parent, kChunk_XMP_)
{
this->size = 0;
}
| @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,934 | XMPChunk::XMPChunk(Container* parent, WEBP_MetaHandler* handler)
: Chunk(parent, handler)
{
handler->packetInfo.offset = this->pos + 8;
handler->packetInfo.length = (XMP_Int32) this->data.size();
handler->xmpPacket.reserve(handler->packetInfo.length);
handler->xmpPacket.assign(handler->packetInfo.len... | null | 0 | XMPChunk::XMPChunk(Container* parent, WEBP_MetaHandler* handler)
: Chunk(parent, handler)
{
handler->packetInfo.offset = this->pos + 8;
handler->packetInfo.length = (XMP_Int32) this->data.size();
handler->xmpPacket.reserve(handler->packetInfo.length);
handler->xmpPacket.assign(handler->packetInfo.len... | @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,935 | void Chunk::write(WEBP_MetaHandler* handler)
{
XMP_IO* file = handler->parent->ioRef;
if (this->needsRewrite) {
this->pos = file->Offset();
XIO::WriteUns32_LE(file, this->tag);
XIO::WriteUns32_LE(file, (XMP_Uns32) this->size);
file->Write(this->data.data(), (XMP_Int32) this->size... | null | 0 | void Chunk::write(WEBP_MetaHandler* handler)
{
XMP_IO* file = handler->parent->ioRef;
if (this->needsRewrite) {
this->pos = file->Offset();
XIO::WriteUns32_LE(file, this->tag);
XIO::WriteUns32_LE(file, (XMP_Uns32) this->size);
file->Write(this->data.data(), (XMP_Int32) this->size... | @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,936 | void XMPChunk::write(WEBP_MetaHandler* handler)
{
XMP_IO* file = handler->parent->ioRef;
this->size = handler->xmpPacket.size();
XIO::WriteUns32_LE(file, this->tag);
XIO::WriteUns32_LE(file, (XMP_Uns32) this->size);
file->Write(handler->xmpPacket.data(), (XMP_Int32) this->size);
if (this->size &... | null | 0 | void XMPChunk::write(WEBP_MetaHandler* handler)
{
XMP_IO* file = handler->parent->ioRef;
this->size = handler->xmpPacket.size();
XIO::WriteUns32_LE(file, this->tag);
XIO::WriteUns32_LE(file, (XMP_Uns32) this->size);
file->Write(handler->xmpPacket.data(), (XMP_Int32) this->size);
if (this->size &... | @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,937 | Chunk::~Chunk()
{
}
| null | 0 | Chunk::~Chunk()
{
}
| @@ -120,8 +120,10 @@ VP8XChunk::VP8XChunk(Container* parent)
this->data.assign(this->size, 0);
XMP_Uns8* bitstream =
(XMP_Uns8*)parent->chunks[WEBP_CHUNK_IMAGE][0]->data.data();
- XMP_Uns32 width = ((bitstream[7] << 8) | bitstream[6]) & 0x3fff;
- XMP_Uns32 height = ((bitstream[9] << 8) | bitstr... | CWE-476 | null | null |
7,938 | bool PSIR_FileWriter::GetImgRsrc ( XMP_Uns16 id, ImgRsrcInfo* info ) const
{
InternalRsrcMap::const_iterator rsrcPos = this->imgRsrcs.find ( id );
if ( rsrcPos == this->imgRsrcs.end() ) return false;
const InternalRsrcInfo & rsrcInfo = rsrcPos->second;
if ( info != 0 ) {
info->id = rsrcInfo.id;
info->dataLen ... | null | 0 | bool PSIR_FileWriter::GetImgRsrc ( XMP_Uns16 id, ImgRsrcInfo* info ) const
{
InternalRsrcMap::const_iterator rsrcPos = this->imgRsrcs.find ( id );
if ( rsrcPos == this->imgRsrcs.end() ) return false;
const InternalRsrcInfo & rsrcInfo = rsrcPos->second;
if ( info != 0 ) {
info->id = rsrcInfo.id;
info->dataLen ... | @@ -319,6 +319,12 @@ void PSIR_FileWriter::ParseFileResources ( XMP_IO* fileRef, XMP_Uns32 length )
XMP_Uns32 dataLen = XIO::ReadUns32_BE ( fileRef );
XMP_Uns32 dataTotal = ((dataLen + 1) & 0xFFFFFFFEUL); // Round up to an even total.
+ // See bug https://bugs.freedesktop.org/show_bug.cgi?id=105204
+ // If ... | CWE-125 | null | null |
7,939 | bool PSIR_FileWriter::IsLegacyChanged()
{
if ( ! this->changed ) return false;
if ( this->legacyDeleted ) return true;
InternalRsrcMap::iterator irPos = this->imgRsrcs.begin();
InternalRsrcMap::iterator irEnd = this->imgRsrcs.end();
for ( ; irPos != irEnd; ++irPos ) {
const InternalRsrcInfo & rsrcInfo = irPos... | null | 0 | bool PSIR_FileWriter::IsLegacyChanged()
{
if ( ! this->changed ) return false;
if ( this->legacyDeleted ) return true;
InternalRsrcMap::iterator irPos = this->imgRsrcs.begin();
InternalRsrcMap::iterator irEnd = this->imgRsrcs.end();
for ( ; irPos != irEnd; ++irPos ) {
const InternalRsrcInfo & rsrcInfo = irPos... | @@ -319,6 +319,12 @@ void PSIR_FileWriter::ParseFileResources ( XMP_IO* fileRef, XMP_Uns32 length )
XMP_Uns32 dataLen = XIO::ReadUns32_BE ( fileRef );
XMP_Uns32 dataTotal = ((dataLen + 1) & 0xFFFFFFFEUL); // Round up to an even total.
+ // See bug https://bugs.freedesktop.org/show_bug.cgi?id=105204
+ // If ... | CWE-125 | null | null |
7,940 | static inline bool IsMetadataImgRsrc ( XMP_Uns16 id )
{
if ( id == 0 ) return false;
int i;
for ( i = 0; id < kPSIR_MetadataIDs[i]; ++i ) {}
if ( id == kPSIR_MetadataIDs[i] ) return true;
return false;
} // IsMetadataImgRsrc
| null | 0 | static inline bool IsMetadataImgRsrc ( XMP_Uns16 id )
{
if ( id == 0 ) return false;
int i;
for ( i = 0; id < kPSIR_MetadataIDs[i]; ++i ) {}
if ( id == kPSIR_MetadataIDs[i] ) return true;
return false;
} // IsMetadataImgRsrc
| @@ -319,6 +319,12 @@ void PSIR_FileWriter::ParseFileResources ( XMP_IO* fileRef, XMP_Uns32 length )
XMP_Uns32 dataLen = XIO::ReadUns32_BE ( fileRef );
XMP_Uns32 dataTotal = ((dataLen + 1) & 0xFFFFFFFEUL); // Round up to an even total.
+ // See bug https://bugs.freedesktop.org/show_bug.cgi?id=105204
+ // If ... | CWE-125 | null | null |
7,941 | void PSIR_FileWriter::ParseMemoryResources ( const void* data, XMP_Uns32 length, bool copyData /* = true */ )
{
this->DeleteExistingInfo();
this->memParsed = true;
if ( length == 0 ) return;
if ( ! copyData ) {
this->memContent = (XMP_Uns8*) data;
XMP_Assert ( ! this->ownedContent );
} else {
if ( length >... | null | 0 | void PSIR_FileWriter::ParseMemoryResources ( const void* data, XMP_Uns32 length, bool copyData /* = true */ )
{
this->DeleteExistingInfo();
this->memParsed = true;
if ( length == 0 ) return;
if ( ! copyData ) {
this->memContent = (XMP_Uns8*) data;
XMP_Assert ( ! this->ownedContent );
} else {
if ( length >... | @@ -319,6 +319,12 @@ void PSIR_FileWriter::ParseFileResources ( XMP_IO* fileRef, XMP_Uns32 length )
XMP_Uns32 dataLen = XIO::ReadUns32_BE ( fileRef );
XMP_Uns32 dataTotal = ((dataLen + 1) & 0xFFFFFFFEUL); // Round up to an even total.
+ // See bug https://bugs.freedesktop.org/show_bug.cgi?id=105204
+ // If ... | CWE-125 | null | null |
7,942 | void PSIR_FileWriter::SetImgRsrc ( XMP_Uns16 id, const void* clientPtr, XMP_Uns32 length )
{
InternalRsrcInfo* rsrcPtr = 0;
InternalRsrcMap::iterator rsrcPos = this->imgRsrcs.find ( id );
if ( rsrcPos == this->imgRsrcs.end() ) {
InternalRsrcMap::value_type mapValue ( id, InternalRsrcInfo ( id, length, this->file... | null | 0 | void PSIR_FileWriter::SetImgRsrc ( XMP_Uns16 id, const void* clientPtr, XMP_Uns32 length )
{
InternalRsrcInfo* rsrcPtr = 0;
InternalRsrcMap::iterator rsrcPos = this->imgRsrcs.find ( id );
if ( rsrcPos == this->imgRsrcs.end() ) {
InternalRsrcMap::value_type mapValue ( id, InternalRsrcInfo ( id, length, this->file... | @@ -319,6 +319,12 @@ void PSIR_FileWriter::ParseFileResources ( XMP_IO* fileRef, XMP_Uns32 length )
XMP_Uns32 dataLen = XIO::ReadUns32_BE ( fileRef );
XMP_Uns32 dataTotal = ((dataLen + 1) & 0xFFFFFFFEUL); // Round up to an even total.
+ // See bug https://bugs.freedesktop.org/show_bug.cgi?id=105204
+ // If ... | CWE-125 | null | null |
7,943 | bool PostScript_MetaHandler::ExtractContainsXMPHint(IOBuffer &ioBuf,XMP_Int64 containsXMPStartpos)
{
XMP_IO* fileRef = this->parent->ioRef;
int xmpHint = kPSHint_NoMain; // ! From here on, a failure means "no main", not "no marker".
if ( ! CheckFileSpace ( fileRef, &ioBuf, 1 ) ) return false;
if ( ! IsSpaceOrTab ( ... | null | 0 | bool PostScript_MetaHandler::ExtractContainsXMPHint(IOBuffer &ioBuf,XMP_Int64 containsXMPStartpos)
{
XMP_IO* fileRef = this->parent->ioRef;
int xmpHint = kPSHint_NoMain; // ! From here on, a failure means "no main", not "no marker".
if ( ! CheckFileSpace ( fileRef, &ioBuf, 1 ) ) return false;
if ( ! IsSpaceOrTab ( ... | @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,944 | bool PostScript_MetaHandler::FindLastPacket()
{
size_t bufPos, bufLen;
XMP_IO* fileRef = this->parent->ioRef;
XMP_Int64 fileLen = fileRef->Length();
XMP_PacketInfo & packetInfo = this->packetInfo;
XMPScanner scanner ( fileLen );
enum { kBufferSize = 64*1024 };
XMP_Uns8 buffer [kBufferSize];
XMP_AbortProc... | null | 0 | bool PostScript_MetaHandler::FindLastPacket()
{
size_t bufPos, bufLen;
XMP_IO* fileRef = this->parent->ioRef;
XMP_Int64 fileLen = fileRef->Length();
XMP_PacketInfo & packetInfo = this->packetInfo;
XMPScanner scanner ( fileLen );
enum { kBufferSize = 64*1024 };
XMP_Uns8 buffer [kBufferSize];
XMP_AbortProc... | @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,945 | int PostScript_MetaHandler::FindPostScriptHint()
{
bool found = false;
IOBuffer ioBuf;
XMP_Uns8 ch;
XMP_IO* fileRef = this->parent->ioRef;
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
const bool checkAbort = (abortProc != 0);
fileRef->Rewind()... | null | 0 | int PostScript_MetaHandler::FindPostScriptHint()
{
bool found = false;
IOBuffer ioBuf;
XMP_Uns8 ch;
XMP_IO* fileRef = this->parent->ioRef;
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
const bool checkAbort = (abortProc != 0);
fileRef->Rewind()... | @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,946 | bool PostScript_CheckFormat ( XMP_FileFormat format,
XMP_StringPtr filePath,
XMP_IO* fileRef,
XMPFiles * parent )
{
IgnoreParam(filePath); IgnoreParam(parent);
XMP_Assert ( (format == kXMP_EPSFile) || (format == kXMP_PostScriptFi... | null | 0 | bool PostScript_CheckFormat ( XMP_FileFormat format,
XMP_StringPtr filePath,
XMP_IO* fileRef,
XMPFiles * parent )
{
IgnoreParam(filePath); IgnoreParam(parent);
XMP_Assert ( (format == kXMP_EPSFile) || (format == kXMP_PostScriptFi... | @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,947 | PostScript_MetaHandler::PostScript_MetaHandler ( XMPFiles * _parent ):dscFlags(0),docInfoFlags(0)
,containsXMPHint(false),fileformat(kXMP_UnknownFile)
{
this->parent = _parent;
this->handlerFlags = kPostScript_HandlerFlags;
this->stdCharForm = kXMP_Char8Bit;
this->psHint = kPSHint_NoMarker;
} // PostScript_MetaHa... | null | 0 | PostScript_MetaHandler::PostScript_MetaHandler ( XMPFiles * _parent ):dscFlags(0),docInfoFlags(0)
,containsXMPHint(false),fileformat(kXMP_UnknownFile)
{
this->parent = _parent;
this->handlerFlags = kPostScript_HandlerFlags;
this->stdCharForm = kXMP_Char8Bit;
this->psHint = kPSHint_NoMarker;
} // PostScript_MetaHa... | @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,948 | XMPFileHandler * PostScript_MetaHandlerCTor ( XMPFiles * parent )
{
XMPFileHandler * newHandler = new PostScript_MetaHandler ( parent );
return newHandler;
} // PostScript_MetaHandlerCTor
| null | 0 | XMPFileHandler * PostScript_MetaHandlerCTor ( XMPFiles * parent )
{
XMPFileHandler * newHandler = new PostScript_MetaHandler ( parent );
return newHandler;
} // PostScript_MetaHandlerCTor
| @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,949 | PostScript_MetaHandler::TokenLocation& PostScript_MetaHandler::getTokenInfo(TokenFlag tFlag)
{
if ((docInfoFlags&tFlag)&&tFlag>=kPS_ADOContainsXMP && tFlag<=kPS_EndPostScript)
{
size_t index=0;
XMP_Uns64 flag=tFlag;
while(flag>>=1) index++;
return fileTokenInfo[index];
}
return fileTokenInfo[kPS_NoData];
}
| null | 0 | PostScript_MetaHandler::TokenLocation& PostScript_MetaHandler::getTokenInfo(TokenFlag tFlag)
{
if ((docInfoFlags&tFlag)&&tFlag>=kPS_ADOContainsXMP && tFlag<=kPS_EndPostScript)
{
size_t index=0;
XMP_Uns64 flag=tFlag;
while(flag>>=1) index++;
return fileTokenInfo[index];
}
return fileTokenInfo[kPS_NoData];
}
| @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,950 | PostScript_MetaHandler::~PostScript_MetaHandler()
{
} // PostScript_MetaHandler::~PostScript_MetaHandler
| null | 0 | PostScript_MetaHandler::~PostScript_MetaHandler()
{
} // PostScript_MetaHandler::~PostScript_MetaHandler
| @@ -885,7 +885,9 @@ void PostScript_MetaHandler::ParsePSFile()
if (CheckBytes ( ioBuf.ptr, Uns8Ptr("iler"), 4 ))
{
ioBuf.ptr+=4;
- while(!IsNewline(*ioBuf.ptr)) ++ioBuf.ptr;
+ while(ioBuf.ptr < ioBuf.limit &&
+ !IsNewline(*ioBuf.ptr))
+ ... | CWE-125 | null | null |
7,951 | void TIFF_MetaHandler::CacheFileData()
{
XMP_IO* fileRef = this->parent->ioRef;
XMP_PacketInfo & packetInfo = this->packetInfo;
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
const bool checkAbort = (abortProc != 0);
XMP_Assert ( ! this->contain... | null | 0 | void TIFF_MetaHandler::CacheFileData()
{
XMP_IO* fileRef = this->parent->ioRef;
XMP_PacketInfo & packetInfo = this->packetInfo;
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
const bool checkAbort = (abortProc != 0);
XMP_Assert ( ! this->contain... | @@ -235,8 +235,9 @@ void TIFF_MetaHandler::ProcessXMP()
// zero padding for the IPTC digest. If the full digest differs, recheck without the padding.
iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
-
- if ( (iptcDigestState == kDigestDiffers) && ... | CWE-125 | null | null |
7,952 | bool TIFF_CheckFormat ( XMP_FileFormat format,
XMP_StringPtr filePath,
XMP_IO* fileRef,
XMPFiles * parent )
{
IgnoreParam(format); IgnoreParam(filePath); IgnoreParam(parent);
XMP_Assert ( format == kXMP_TIFFFile );
enum { kMinimalTIFFSize ... | null | 0 | bool TIFF_CheckFormat ( XMP_FileFormat format,
XMP_StringPtr filePath,
XMP_IO* fileRef,
XMPFiles * parent )
{
IgnoreParam(format); IgnoreParam(filePath); IgnoreParam(parent);
XMP_Assert ( format == kXMP_TIFFFile );
enum { kMinimalTIFFSize ... | @@ -235,8 +235,9 @@ void TIFF_MetaHandler::ProcessXMP()
// zero padding for the IPTC digest. If the full digest differs, recheck without the padding.
iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
-
- if ( (iptcDigestState == kDigestDiffers) && ... | CWE-125 | null | null |
7,953 | TIFF_MetaHandler::TIFF_MetaHandler ( XMPFiles * _parent ) : psirMgr(0), iptcMgr(0)
{
this->parent = _parent;
this->handlerFlags = kTIFF_HandlerFlags;
this->stdCharForm = kXMP_Char8Bit;
} // TIFF_MetaHandler::TIFF_MetaHandler
| null | 0 | TIFF_MetaHandler::TIFF_MetaHandler ( XMPFiles * _parent ) : psirMgr(0), iptcMgr(0)
{
this->parent = _parent;
this->handlerFlags = kTIFF_HandlerFlags;
this->stdCharForm = kXMP_Char8Bit;
} // TIFF_MetaHandler::TIFF_MetaHandler
| @@ -235,8 +235,9 @@ void TIFF_MetaHandler::ProcessXMP()
// zero padding for the IPTC digest. If the full digest differs, recheck without the padding.
iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
-
- if ( (iptcDigestState == kDigestDiffers) && ... | CWE-125 | null | null |
7,954 | XMPFileHandler * TIFF_MetaHandlerCTor ( XMPFiles * parent )
{
return new TIFF_MetaHandler ( parent );
} // TIFF_MetaHandlerCTor
| null | 0 | XMPFileHandler * TIFF_MetaHandlerCTor ( XMPFiles * parent )
{
return new TIFF_MetaHandler ( parent );
} // TIFF_MetaHandlerCTor
| @@ -235,8 +235,9 @@ void TIFF_MetaHandler::ProcessXMP()
// zero padding for the IPTC digest. If the full digest differs, recheck without the padding.
iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
-
- if ( (iptcDigestState == kDigestDiffers) && ... | CWE-125 | null | null |
7,955 | void TIFF_MetaHandler::UpdateFile ( bool doSafeUpdate )
{
XMP_Assert ( ! doSafeUpdate ); // This should only be called for "unsafe" updates.
XMP_IO* destRef = this->parent->ioRef;
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
XMP_Int64 oldPacketOffset... | null | 0 | void TIFF_MetaHandler::UpdateFile ( bool doSafeUpdate )
{
XMP_Assert ( ! doSafeUpdate ); // This should only be called for "unsafe" updates.
XMP_IO* destRef = this->parent->ioRef;
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
XMP_Int64 oldPacketOffset... | @@ -235,8 +235,9 @@ void TIFF_MetaHandler::ProcessXMP()
// zero padding for the IPTC digest. If the full digest differs, recheck without the padding.
iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
-
- if ( (iptcDigestState == kDigestDiffers) && ... | CWE-125 | null | null |
7,956 | TIFF_MetaHandler::~TIFF_MetaHandler()
{
if ( this->psirMgr != 0 ) delete ( this->psirMgr );
if ( this->iptcMgr != 0 ) delete ( this->iptcMgr );
} // TIFF_MetaHandler::~TIFF_MetaHandler
| null | 0 | TIFF_MetaHandler::~TIFF_MetaHandler()
{
if ( this->psirMgr != 0 ) delete ( this->psirMgr );
if ( this->iptcMgr != 0 ) delete ( this->iptcMgr );
} // TIFF_MetaHandler::~TIFF_MetaHandler
| @@ -235,8 +235,9 @@ void TIFF_MetaHandler::ProcessXMP()
// zero padding for the IPTC digest. If the full digest differs, recheck without the padding.
iptcDigestState = PhotoDataUtils::CheckIPTCDigest ( iptcInfo.dataPtr, iptcInfo.dataLen, digestInfo.dataPtr );
-
- if ( (iptcDigestState == kDigestDiffers) && ... | CWE-125 | null | null |
7,957 | _render_state_rescale( RenderState state )
{
if ( state->need_rescale && state->size )
{
FT_Set_Char_Size( state->face, 0,
(FT_F26Dot6)( state->char_size * 64.0 ),
0, state->resolution );
state->need_rescale = 0;
}
}
| DoS Exec Code Overflow | 0 | _render_state_rescale( RenderState state )
{
if ( state->need_rescale && state->size )
{
FT_Set_Char_Size( state->face, 0,
(FT_F26Dot6)( state->char_size * 64.0 ),
0, state->resolution );
state->need_rescale = 0;
}
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,958 | adisplay_change_gamma( ADisplay display,
double delta )
{
display->gamma += delta;
if ( display->gamma > 3.0 )
display->gamma = 3.0;
else if ( display->gamma < 0.0 )
display->gamma = 0.0;
grSetGlyphGamma( display->gamma );
}
| DoS Exec Code Overflow | 0 | adisplay_change_gamma( ADisplay display,
double delta )
{
display->gamma += delta;
if ( display->gamma > 3.0 )
display->gamma = 3.0;
else if ( display->gamma < 0.0 )
display->gamma = 0.0;
grSetGlyphGamma( display->gamma );
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,959 | adisplay_clear( ADisplay display )
{
grBitmap* bit = display->bitmap;
int pitch = bit->pitch;
if ( pitch < 0 )
pitch = -pitch;
if ( bit->mode == gr_pixel_mode_gray )
memset( bit->buffer, display->back_color.value, pitch * bit->rows );
else
{
unsigned char* p ... | DoS Exec Code Overflow | 0 | adisplay_clear( ADisplay display )
{
grBitmap* bit = display->bitmap;
int pitch = bit->pitch;
if ( pitch < 0 )
pitch = -pitch;
if ( bit->mode == gr_pixel_mode_gray )
memset( bit->buffer, display->back_color.value, pitch * bit->rows );
else
{
unsigned char* p ... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,960 | adisplay_draw_glyph( void* _display,
DisplayMode mode,
int x,
int y,
int width,
int height,
int pitch,
v... | DoS Exec Code Overflow | 0 | adisplay_draw_glyph( void* _display,
DisplayMode mode,
int x,
int y,
int width,
int height,
int pitch,
v... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,961 | adisplay_draw_text( void* _display,
int x,
int y,
const char* msg )
{
ADisplay adisplay = (ADisplay)_display;
grWriteCellString( adisplay->bitmap, x, y, msg,
adisplay->fore_color );
}
| DoS Exec Code Overflow | 0 | adisplay_draw_text( void* _display,
int x,
int y,
const char* msg )
{
ADisplay adisplay = (ADisplay)_display;
grWriteCellString( adisplay->bitmap, x, y, msg,
adisplay->fore_color );
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,962 | adisplay_init( ADisplay display,
grPixelMode mode )
{
grSurface* surface;
grBitmap bit;
if ( mode != gr_pixel_mode_gray &&
mode != gr_pixel_mode_rgb24 )
return -1;
grInitDevices();
bit.mode = mode;
bit.width = DIM_X;
bit.rows = DIM_Y;
b... | DoS Exec Code Overflow | 0 | adisplay_init( ADisplay display,
grPixelMode mode )
{
grSurface* surface;
grBitmap bit;
if ( mode != gr_pixel_mode_gray &&
mode != gr_pixel_mode_rgb24 )
return -1;
grInitDevices();
bit.mode = mode;
bit.width = DIM_X;
bit.rows = DIM_Y;
b... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,963 | event_change_gamma( RenderState state,
double delta )
{
ADisplay display = (ADisplay)state->display.disp;
adisplay_change_gamma( display, delta );
if ( display->gamma == 0.0 )
sprintf( state->message0, "gamma set to sRGB" );
else
sprintf( state->message0, ... | DoS Exec Code Overflow | 0 | event_change_gamma( RenderState state,
double delta )
{
ADisplay display = (ADisplay)state->display.disp;
adisplay_change_gamma( display, delta );
if ( display->gamma == 0.0 )
sprintf( state->message0, "gamma set to sRGB" );
else
sprintf( state->message0, ... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,964 | event_change_size( RenderState state,
double delta )
{
double char_size = state->char_size;
char_size += delta;
if ( char_size < 6.0 )
char_size = 6.0;
else if ( char_size > 300.0 )
char_size = 300.0;
render_state_set_size( state, char_size );
}
| DoS Exec Code Overflow | 0 | event_change_size( RenderState state,
double delta )
{
double char_size = state->char_size;
char_size += delta;
if ( char_size < 6.0 )
char_size = 6.0;
else if ( char_size > 300.0 )
char_size = 300.0;
render_state_set_size( state, char_size );
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,965 | event_help( RenderState state )
{
ADisplay display = (ADisplay)state->display.disp;
grEvent dummy_event;
adisplay_clear( display );
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( display->bitmap );
grWriteln( "Text Viewer - Simple text/font proofer for the FreeType project" ... | DoS Exec Code Overflow | 0 | event_help( RenderState state )
{
ADisplay display = (ADisplay)state->display.disp;
grEvent dummy_event;
adisplay_clear( display );
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( display->bitmap );
grWriteln( "Text Viewer - Simple text/font proofer for the FreeType project" ... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,966 | get_option_arg( char* option,
char** *pargv,
char** argend )
{
if ( option[2] == 0 )
{
char** argv = *pargv;
if ( ++argv >= argend )
usage();
option = argv[0];
*pargv = argv;
}
else
option += 2;
return option;
}
| DoS Exec Code Overflow | 0 | get_option_arg( char* option,
char** *pargv,
char** argend )
{
if ( option[2] == 0 )
{
char** argv = *pargv;
if ( ++argv >= argend )
usage();
option = argv[0];
*pargv = argv;
}
else
option += 2;
return option;
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,967 | main( int argc,
char** argv )
{
char** argend = argv + argc;
ADisplayRec adisplay[1];
RenderStateRec state[1];
DisplayRec display[1];
int resolution = -1;
double size = -1;
const char* textfile = NULL;
unsigned char* text... | DoS Exec Code Overflow | 0 | main( int argc,
char** argv )
{
char** argend = argv + argc;
ADisplayRec adisplay[1];
RenderStateRec state[1];
DisplayRec display[1];
int resolution = -1;
double size = -1;
const char* textfile = NULL;
unsigned char* text... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,968 | panic( const char* fmt,
... )
{
va_list args;
va_start( args, fmt );
vfprintf( stderr, fmt, args );
va_end( args );
exit( 1 );
}
| DoS Exec Code Overflow | 0 | panic( const char* fmt,
... )
{
va_list args;
va_start( args, fmt );
vfprintf( stderr, fmt, args );
va_end( args );
exit( 1 );
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,969 | process_event( RenderState state,
grEvent* event )
{
int ret = 0;
ColumnState column = &state->columns[state->col];
switch ( event->key )
{
case grKeyEsc:
case grKEY( 'q' ):
ret = 1;
break;
case grKeyF1:
case grKEY( '?' ):
event... | DoS Exec Code Overflow | 0 | process_event( RenderState state,
grEvent* event )
{
int ret = 0;
ColumnState column = &state->columns[state->col];
switch ( event->key )
{
case grKeyEsc:
case grKEY( 'q' ):
ret = 1;
break;
case grKeyF1:
case grKEY( '?' ):
event... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,970 | render_state_done( RenderState state )
{
if ( state->filepath != state->filepath0 )
{
free( (char*)state->filepath );
state->filepath = state->filepath0;
}
state->filepath0[0] = 0;
state->filename = 0;
if ( state->face )
{
FT_Done_Face( state->face );
state-... | DoS Exec Code Overflow | 0 | render_state_done( RenderState state )
{
if ( state->filepath != state->filepath0 )
{
free( (char*)state->filepath );
state->filepath = state->filepath0;
}
state->filepath0[0] = 0;
state->filename = 0;
if ( state->face )
{
FT_Done_Face( state->face );
state-... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,971 | render_state_draw( RenderState state,
const unsigned char* text,
int idx,
int x,
int y,
int width,
int ... | DoS Exec Code Overflow | 0 | render_state_draw( RenderState state,
const unsigned char* text,
int idx,
int x,
int y,
int width,
int ... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,972 | render_state_init( RenderState state,
Display display )
{
memset( state, 0, sizeof ( *state ) );
state->text = default_text;
state->filepath = state->filepath0;
state->filename = "<none>";
state->filepath0[0] = 0;
state->resolution = 72;
stat... | DoS Exec Code Overflow | 0 | render_state_init( RenderState state,
Display display )
{
memset( state, 0, sizeof ( *state ) );
state->text = default_text;
state->filepath = state->filepath0;
state->filename = "<none>";
state->filepath0[0] = 0;
state->resolution = 72;
stat... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,973 | render_state_set_file( RenderState state,
int idx )
{
const char* filepath;
if ( idx < 0 )
idx = state->num_faces - 1;
else if ( idx >= state->num_faces )
idx = 0;
if ( idx >= state->num_faces )
return -2;
state->face_index = idx;
fil... | DoS Exec Code Overflow | 0 | render_state_set_file( RenderState state,
int idx )
{
const char* filepath;
if ( idx < 0 )
idx = state->num_faces - 1;
else if ( idx >= state->num_faces )
idx = 0;
if ( idx >= state->num_faces )
return -2;
state->face_index = idx;
fil... | @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,974 | render_state_set_resolution( RenderState state,
int resolution )
{
state->resolution = resolution;
state->need_rescale = 1;
}
| DoS Exec Code Overflow | 0 | render_state_set_resolution( RenderState state,
int resolution )
{
state->resolution = resolution;
state->need_rescale = 1;
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,975 | render_state_set_size( RenderState state,
float char_size )
{
state->char_size = char_size;
state->need_rescale = 1;
}
| DoS Exec Code Overflow | 0 | render_state_set_size( RenderState state,
float char_size )
{
state->char_size = char_size;
state->need_rescale = 1;
}
| @@ -1131,11 +1131,11 @@
state->message = state->message0;
if ( total > 1 )
- sprintf( state->message0, "%s %d/%d @ %5.1fpt",
+ sprintf( state->message0, "%.100s %d/%d @ %5.1fpt",
state->filename, idx + 1, total,
state->char_size );
else
- s... | CWE-119 | null | null |
7,976 | Fatal( const char* message )
{
FTDemo_Display_Done( display );
FTDemo_Done( handle );
PanicZ( message );
}
| DoS Exec Code Overflow | 0 | Fatal( const char* message )
{
FTDemo_Display_Done( display );
FTDemo_Done( handle );
PanicZ( message );
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,977 | Process_Event( grEvent* event )
{
int ret = 0;
status.header = NULL;
switch ( event->key )
{
case grKeyEsc:
case grKEY( 'q' ):
ret = 1;
break;
case grKeyF1:
case grKEY( '?' ):
event_help();
break;
case grKEY( 'a' ):
handle->antialias = !handle-... | DoS Exec Code Overflow | 0 | Process_Event( grEvent* event )
{
int ret = 0;
status.header = NULL;
switch ( event->key )
{
case grKeyEsc:
case grKEY( 'q' ):
ret = 1;
break;
case grKeyF1:
case grKEY( '?' ):
event_help();
break;
case grKEY( 'a' ):
handle->antialias = !handle-... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,978 | circle_draw( FT_F26Dot6 center_x,
FT_F26Dot6 center_y,
FT_F26Dot6 radius,
FTDemo_Handle* handle,
FTDemo_Display* display,
grColor color )
{
FT_Outline outline;
ft_outline_new_circle( &outline, radius, handle );
FT_Out... | DoS Exec Code Overflow | 0 | circle_draw( FT_F26Dot6 center_x,
FT_F26Dot6 center_y,
FT_F26Dot6 radius,
FTDemo_Handle* handle,
FTDemo_Display* display,
grColor color )
{
FT_Outline outline;
ft_outline_new_circle( &outline, radius, handle );
FT_Out... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,979 | event_font_change( int delta )
{
int num_indices;
if ( status.font_index + delta >= handle->num_fonts ||
status.font_index + delta < 0 )
return;
status.font_index += delta;
FTDemo_Set_Current_Font( handle, handle->fonts[status.font_index] );
FTDemo_Set_Current_Charsize( ... | DoS Exec Code Overflow | 0 | event_font_change( int delta )
{
int num_indices;
if ( status.font_index + delta >= handle->num_fonts ||
status.font_index + delta < 0 )
return;
status.font_index += delta;
FTDemo_Set_Current_Font( handle, handle->fonts[status.font_index] );
FTDemo_Set_Current_Charsize( ... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,980 | event_gamma_change( double delta )
{
status.gamma += delta;
if ( status.gamma > 3.0 )
status.gamma = 3.0;
else if ( status.gamma < 0.0 )
status.gamma = 0.0;
grSetGlyphGamma( status.gamma );
sprintf( status.header_buffer, "gamma changed to %.1f%s",
status.gamma, status... | DoS Exec Code Overflow | 0 | event_gamma_change( double delta )
{
status.gamma += delta;
if ( status.gamma > 3.0 )
status.gamma = 3.0;
else if ( status.gamma < 0.0 )
status.gamma = 0.0;
grSetGlyphGamma( status.gamma );
sprintf( status.header_buffer, "gamma changed to %.1f%s",
status.gamma, status... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,981 | event_grid_translate( int dx, int dy )
{
status.x_origin += 32*dx;
status.y_origin += 32*dy;
}
| DoS Exec Code Overflow | 0 | event_grid_translate( int dx, int dy )
{
status.x_origin += 32*dx;
status.y_origin += 32*dy;
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,982 | event_grid_zoom( double zoom )
{
status.scale *= zoom;
sprintf( status.header_buffer, "zoom level %.2f %%\n",
status.scale / status.scale_0 );
status.header = (const char *)status.header_buffer;
}
| DoS Exec Code Overflow | 0 | event_grid_zoom( double zoom )
{
status.scale *= zoom;
sprintf( status.header_buffer, "zoom level %.2f %%\n",
status.scale / status.scale_0 );
status.header = (const char *)status.header_buffer;
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,983 | event_size_change( int delta )
{
status.ptsize += delta;
if ( status.ptsize < 1*64 )
status.ptsize = 1*64;
else if ( status.ptsize > MAXPTSIZE*64 )
status.ptsize = MAXPTSIZE*64;
FTDemo_Set_Current_Charsize( handle, status.ptsize, status.res );
}
| DoS Exec Code Overflow | 0 | event_size_change( int delta )
{
status.ptsize += delta;
if ( status.ptsize < 1*64 )
status.ptsize = 1*64;
else if ( status.ptsize > MAXPTSIZE*64 )
status.ptsize = MAXPTSIZE*64;
FTDemo_Set_Current_Charsize( handle, status.ptsize, status.res );
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,984 | ft_bitmap_draw( FT_Bitmap* bitmap,
int x,
int y,
FTDemo_Display* display,
grColor color)
{
grBitmap gbit;
gbit.width = bitmap->width;
gbit.rows = bitmap->rows;
gbit.pitch = bitmap->pitch;
gbit.buffe... | DoS Exec Code Overflow | 0 | ft_bitmap_draw( FT_Bitmap* bitmap,
int x,
int y,
FTDemo_Display* display,
grColor color)
{
grBitmap gbit;
gbit.width = bitmap->width;
gbit.rows = bitmap->rows;
gbit.pitch = bitmap->pitch;
gbit.buffe... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,985 | ft_outline_draw( FT_Outline* outline,
double scale,
int pen_x,
int pen_y,
FTDemo_Handle* handle,
FTDemo_Display* display,
grColor color )
{
FT_Outline transformed... | DoS Exec Code Overflow | 0 | ft_outline_draw( FT_Outline* outline,
double scale,
int pen_x,
int pen_y,
FTDemo_Handle* handle,
FTDemo_Display* display,
grColor color )
{
FT_Outline transformed... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,986 | ft_outline_new_circle( FT_Outline* outline,
FT_F26Dot6 radius,
FTDemo_Handle* handle )
{
char* tag;
FT_Vector* vec;
FT_F26Dot6 disp = (FT_F26Dot6)( radius * 0.6781 );
FT_Outline_New( handle->library, 12, 1, outline );
outline->n_points = 12;
... | DoS Exec Code Overflow | 0 | ft_outline_new_circle( FT_Outline* outline,
FT_F26Dot6 radius,
FTDemo_Handle* handle )
{
char* tag;
FT_Vector* vec;
FT_F26Dot6 disp = (FT_F26Dot6)( radius * 0.6781 );
FT_Outline_New( handle->library, 12, 1, outline );
outline->n_points = 12;
... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,987 | grid_status_draw_grid( GridStatus st )
{
int x_org = (int)st->x_origin;
int y_org = (int)st->y_origin;
double xy_incr = 64.0 * st->scale;
if ( xy_incr >= 2. )
{
double x2 = x_org;
double y2 = y_org;
for ( ; x2 < st->disp_width; x2 += xy_incr )
grFillVLine( st->disp_bitmap, ... | DoS Exec Code Overflow | 0 | grid_status_draw_grid( GridStatus st )
{
int x_org = (int)st->x_origin;
int y_org = (int)st->y_origin;
double xy_incr = 64.0 * st->scale;
if ( xy_incr >= 2. )
{
double x2 = x_org;
double y2 = y_org;
for ( ; x2 < st->disp_width; x2 += xy_incr )
grFillVLine( st->disp_bitmap, ... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,988 | grid_status_draw_outline( GridStatus st,
FTDemo_Handle* handle,
FTDemo_Display* display )
{
static FT_Stroker stroker;
FT_Size size;
FT_GlyphSlot slot;
double scale = 64.0 * st->scale;
int ox = (int)st... | DoS Exec Code Overflow | 0 | grid_status_draw_outline( GridStatus st,
FTDemo_Handle* handle,
FTDemo_Display* display )
{
static FT_Stroker stroker;
FT_Size size;
FT_GlyphSlot slot;
double scale = 64.0 * st->scale;
int ox = (int)st... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,989 | grid_status_init( GridStatus st,
FTDemo_Display* display )
{
st->scale = 1.0;
st->x_origin = display->bitmap->width / 4;
st->y_origin = display->bitmap->rows / 4;
st->margin = 0.05;
st->axis_color = grFindColor( display->bitmap, 0, 0, 0, 255 );
st->... | DoS Exec Code Overflow | 0 | grid_status_init( GridStatus st,
FTDemo_Display* display )
{
st->scale = 1.0;
st->x_origin = display->bitmap->width / 4;
st->y_origin = display->bitmap->rows / 4;
st->margin = 0.05;
st->axis_color = grFindColor( display->bitmap, 0, 0, 0, 255 );
st->... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,990 | parse_cmdline( int* argc,
char** argv[] )
{
char* execname;
int option;
execname = ft_basename( (*argv)[0] );
while ( 1 )
{
option = getopt( *argc, *argv, "f:r:" );
if ( option == -1 )
break;
switch ( option )
{
case 'f':
... | DoS Exec Code Overflow | 0 | parse_cmdline( int* argc,
char** argv[] )
{
char* execname;
int option;
execname = ft_basename( (*argv)[0] );
while ( 1 )
{
option = getopt( *argc, *argv, "f:r:" );
if ( option == -1 )
break;
switch ( option )
{
case 'f':
... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,991 | usage( char* execname )
{
fprintf( stderr, "\n" );
fprintf( stderr, "ftgrid: simple glyph grid viewer -- part of the FreeType project\n" );
fprintf( stderr, "-----------------------------------------------------------\n" );
fprintf( stderr, "\n" );
fprintf( stderr, "Usage: %s [status below... | DoS Exec Code Overflow | 0 | usage( char* execname )
{
fprintf( stderr, "\n" );
fprintf( stderr, "ftgrid: simple glyph grid viewer -- part of the FreeType project\n" );
fprintf( stderr, "-----------------------------------------------------------\n" );
fprintf( stderr, "\n" );
fprintf( stderr, "Usage: %s [status below... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005, 2006, 2007, 2009 by ... | CWE-119 | null | null |
7,992 | Clear_Display( void )
{
long bitmap_size = (long)bit.pitch * bit.rows;
if ( bitmap_size < 0 )
bitmap_size = -bitmap_size;
memset( bit.buffer, 0, bitmap_size );
}
| DoS Exec Code Overflow | 0 | Clear_Display( void )
{
long bitmap_size = (long)bit.pitch * bit.rows;
if ( bitmap_size < 0 )
bitmap_size = -bitmap_size;
memset( bit.buffer, 0, bitmap_size );
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,993 | Help( void )
{
grEvent dummy_event;
Clear_Display();
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( &bit );
grWriteln( "FreeType Multiple Masters Glyph Viewer - part of the FreeType test suite" );
grLn();
grWriteln( "This program is used to display all glyphs from one or" ... | DoS Exec Code Overflow | 0 | Help( void )
{
grEvent dummy_event;
Clear_Display();
grGotoxy( 0, 0 );
grSetMargin( 2, 1 );
grGotobitmap( &bit );
grWriteln( "FreeType Multiple Masters Glyph Viewer - part of the FreeType test suite" );
grLn();
grWriteln( "This program is used to display all glyphs from one or" ... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,994 | Init_Display( void )
{
grInitDevices();
bit.mode = gr_pixel_mode_gray;
bit.width = DIM_X;
bit.rows = DIM_Y;
bit.grays = 256;
surface = grNewSurface( 0, &bit );
if ( !surface )
PanicZ( "could not allocate display surface\n" );
graph_init = 1;
}
| DoS Exec Code Overflow | 0 | Init_Display( void )
{
grInitDevices();
bit.mode = gr_pixel_mode_gray;
bit.width = DIM_X;
bit.rows = DIM_Y;
bit.grays = 256;
surface = grNewSurface( 0, &bit );
if ( !surface )
PanicZ( "could not allocate display surface\n" );
graph_init = 1;
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,995 | LoadChar( int idx,
int hint )
{
int flags;
flags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
if ( !hint )
flags |= FT_LOAD_NO_HINTING;
if ( !use_sbits )
flags |= FT_LOAD_NO_BITMAP;
return FT_Load_Glyph( face, idx, flags );
}
| DoS Exec Code Overflow | 0 | LoadChar( int idx,
int hint )
{
int flags;
flags = FT_LOAD_DEFAULT | FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH;
if ( !hint )
flags |= FT_LOAD_NO_HINTING;
if ( !use_sbits )
flags |= FT_LOAD_NO_BITMAP;
return FT_Load_Glyph( face, idx, flags );
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,996 | LogMessage( const char* fmt, ... )
{
va_list ap;
va_start( ap, fmt );
vfprintf( stderr, fmt, ap );
va_end( ap );
}
| DoS Exec Code Overflow | 0 | LogMessage( const char* fmt, ... )
{
va_list ap;
va_start( ap, fmt );
vfprintf( stderr, fmt, ap );
va_end( ap );
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,997 | PanicZ( const char* message )
{
fprintf( stderr, "%s\n error = 0x%04x\n", message, error );
exit( 1 );
}
| DoS Exec Code Overflow | 0 | PanicZ( const char* message )
{
fprintf( stderr, "%s\n error = 0x%04x\n", message, error );
exit( 1 );
}
| @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,998 | Process_Event( grEvent* event )
{
int i, axis;
switch ( event->key )
{
case grKeyEsc: /* ESC or q */
case grKEY( 'q' ):
return 0;
case grKeyF1:
case grKEY( '?' ):
Help();
return 1;
/* mode keys */
case grKEY( 'a' ):
antialias = !antialias... | DoS Exec Code Overflow | 0 | Process_Event( grEvent* event )
{
int i, axis;
switch ( event->key )
{
case grKeyEsc: /* ESC or q */
case grKEY( 'q' ):
return 0;
case grKeyF1:
case grKEY( '?' ):
Help();
return 1;
/* mode keys */
case grKEY( 'a' ):
antialias = !antialias... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
7,999 | Render_Glyph( int x_offset,
int y_offset )
{
grBitmap bit3;
FT_Pos x_top, y_top;
/* first, render the glyph image into a bitmap */
if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )
{
error = FT_Render_Glyph( glyph, antialias ? FT_RENDER_MODE_NORMAL
... | DoS Exec Code Overflow | 0 | Render_Glyph( int x_offset,
int y_offset )
{
grBitmap bit3;
FT_Pos x_top, y_top;
/* first, render the glyph image into a bitmap */
if ( glyph->format != FT_GLYPH_FORMAT_BITMAP )
{
error = FT_Render_Glyph( glyph, antialias ? FT_RENDER_MODE_NORMAL
... | @@ -2,7 +2,7 @@
/* */
/* The FreeType project -- a free and portable quality TrueType renderer. */
/* */
-/* Copyright 1996-2000, 2003, 2004, 2005 by ... | CWE-119 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.