Flawfinder version 2.0.10, (C) 2001-2019 David A. Wheeler. Number of rules (primarily dangerous function names) in C/C++ ruleset: 223 Examining data/aobook-1.0.3/src/mainfunc.h Examining data/aobook-1.0.3/src/trgroup.h Examining data/aobook-1.0.3/src/bookmarkwin.c Examining data/aobook-1.0.3/src/envoptdlg_opt.c Examining data/aobook-1.0.3/src/trid_menu.h Examining data/aobook-1.0.3/src/stylelist.c Examining data/aobook-1.0.3/src/envoptdlg.h Examining data/aobook-1.0.3/src/style.c Examining data/aobook-1.0.3/src/styleoptdlg_pv.h Examining data/aobook-1.0.3/src/filedialog.c Examining data/aobook-1.0.3/src/bookmarkdat.h Examining data/aobook-1.0.3/src/globaldata.h Examining data/aobook-1.0.3/src/unzip.c Examining data/aobook-1.0.3/src/bookmarkwin.h Examining data/aobook-1.0.3/src/trid.h Examining data/aobook-1.0.3/src/captiondlg.c Examining data/aobook-1.0.3/src/stylelist.h Examining data/aobook-1.0.3/src/menudat.h Examining data/aobook-1.0.3/src/mainwindow.c Examining data/aobook-1.0.3/src/mainfunc.c Examining data/aobook-1.0.3/src/envoptdlg_key.c Examining data/aobook-1.0.3/src/envoptdlg_pv.h Examining data/aobook-1.0.3/src/styleoptdlg_basic.c Examining data/aobook-1.0.3/src/styleoptdlg_font.c Examining data/aobook-1.0.3/src/appicon.h Examining data/aobook-1.0.3/src/styleoptdlg.c Examining data/aobook-1.0.3/src/sub/aoLayout_line.c Examining data/aobook-1.0.3/src/sub/aoTextLoad.c Examining data/aobook-1.0.3/src/sub/_aolayout.h Examining data/aobook-1.0.3/src/sub/aoLayout_main.c Examining data/aobook-1.0.3/src/sub/aoText.h Examining data/aobook-1.0.3/src/sub/aoLayout_sub.c Examining data/aobook-1.0.3/src/sub/aoTextConv_sub.c Examining data/aobook-1.0.3/src/sub/aoTextConv.c Examining data/aobook-1.0.3/src/sub/aoStyle.h Examining data/aobook-1.0.3/src/sub/aoLayout_draw.c Examining data/aobook-1.0.3/src/sub/_aotextconv.h Examining data/aobook-1.0.3/src/sub/aoFont.c Examining data/aobook-1.0.3/src/sub/_aobufdef.h Examining data/aobook-1.0.3/src/sub/aoLayout.h Examining data/aobook-1.0.3/src/sub/aoLayout.c Examining data/aobook-1.0.3/src/sub/aoFont.h Examining data/aobook-1.0.3/src/styleoptdlg_char.c Examining data/aobook-1.0.3/src/bookmarkdat.c Examining data/aobook-1.0.3/src/main.c Examining data/aobook-1.0.3/src/mainwindow.h Examining data/aobook-1.0.3/src/style.h Examining data/aobook-1.0.3/src/deftrans.h Examining data/aobook-1.0.3/src/envoptdlg_mouse.c Examining data/aobook-1.0.3/src/globaldata.c Examining data/aobook-1.0.3/src/envoptdlg.c Examining data/aobook-1.0.3/src/envoptdlg_tool.c Examining data/aobook-1.0.3/translation/mtrconv.c Examining data/aobook-1.0.3/mlib/src/mRectBox.c Examining data/aobook-1.0.3/mlib/src/lib/mFontConfig.c Examining data/aobook-1.0.3/mlib/src/lib/mFTGSUB.c Examining data/aobook-1.0.3/mlib/src/lib/mZlib.c Examining data/aobook-1.0.3/mlib/src/lib/mFreeType.c Examining data/aobook-1.0.3/mlib/src/mIniRead.c Examining data/aobook-1.0.3/mlib/src/mTextRead.c Examining data/aobook-1.0.3/mlib/src/mIOFileBuf.c Examining data/aobook-1.0.3/mlib/src/mUtilStdio.c Examining data/aobook-1.0.3/mlib/src/mMemAuto.c Examining data/aobook-1.0.3/mlib/src/mUtilFile_common.c Examining data/aobook-1.0.3/mlib/src/mUtil.c Examining data/aobook-1.0.3/mlib/src/mStr.c Examining data/aobook-1.0.3/mlib/src/mIniWrite.c Examining data/aobook-1.0.3/mlib/src/linux/mUtilFile.c Examining data/aobook-1.0.3/mlib/src/linux/mFile.c Examining data/aobook-1.0.3/mlib/src/linux/mThread.c Examining data/aobook-1.0.3/mlib/src/linux/mEnumFont.c Examining data/aobook-1.0.3/mlib/src/linux/mUtilSys.c Examining data/aobook-1.0.3/mlib/src/linux/mStr_sys.c Examining data/aobook-1.0.3/mlib/src/linux/mPath.c Examining data/aobook-1.0.3/mlib/src/linux/mNanoTime.c Examining data/aobook-1.0.3/mlib/src/linux/mDirEntry.c Examining data/aobook-1.0.3/mlib/src/linux/mFont.c Examining data/aobook-1.0.3/mlib/src/mTextParam.c Examining data/aobook-1.0.3/mlib/src/private/mMenu_pv.h Examining data/aobook-1.0.3/mlib/src/private/mWindow_pv.h Examining data/aobook-1.0.3/mlib/src/private/mEventList.h Examining data/aobook-1.0.3/mlib/src/private/mAppTimer.c Examining data/aobook-1.0.3/mlib/src/private/mTranslation.h Examining data/aobook-1.0.3/mlib/src/private/mListViewArea.c Examining data/aobook-1.0.3/mlib/src/private/mEvent_pv.c Examining data/aobook-1.0.3/mlib/src/private/mMenuWindow.h Examining data/aobook-1.0.3/mlib/src/private/mEditTextBuf.c Examining data/aobook-1.0.3/mlib/src/private/mWidget_pv.c Examining data/aobook-1.0.3/mlib/src/private/mAppPrivate.h Examining data/aobook-1.0.3/mlib/src/private/mMenu_pv.c Examining data/aobook-1.0.3/mlib/src/private/mListViewPopup.c Examining data/aobook-1.0.3/mlib/src/private/mPixbuf_pv.h Examining data/aobook-1.0.3/mlib/src/private/mWidget_pv.h Examining data/aobook-1.0.3/mlib/src/private/mEvent_pv.h Examining data/aobook-1.0.3/mlib/src/private/mEventList.c Examining data/aobook-1.0.3/mlib/src/private/mLVItemMan.c Examining data/aobook-1.0.3/mlib/src/private/mEditTextBuf.h Examining data/aobook-1.0.3/mlib/src/private/mMenuWindow.c Examining data/aobook-1.0.3/mlib/src/private/mListViewArea.h Examining data/aobook-1.0.3/mlib/src/private/mAppTimer.h Examining data/aobook-1.0.3/mlib/src/private/mTranslation.c Examining data/aobook-1.0.3/mlib/src/private/mLVItemMan.h Examining data/aobook-1.0.3/mlib/src/private/mListViewPopup.h Examining data/aobook-1.0.3/mlib/src/x11/x11_cursor.c Examining data/aobook-1.0.3/mlib/src/x11/x11_im.h Examining data/aobook-1.0.3/mlib/src/x11/x11_keyconv.c Examining data/aobook-1.0.3/mlib/src/x11/x11_window.c Examining data/aobook-1.0.3/mlib/src/x11/x11_window.h Examining data/aobook-1.0.3/mlib/src/x11/x11_widget.c Examining data/aobook-1.0.3/mlib/src/x11/x11_main.c Examining data/aobook-1.0.3/mlib/src/x11/x11_dnd.h Examining data/aobook-1.0.3/mlib/src/x11/x11_dnd.c Examining data/aobook-1.0.3/mlib/src/x11/x11_img_cursor.h Examining data/aobook-1.0.3/mlib/src/x11/x11_clipboard.h Examining data/aobook-1.0.3/mlib/src/x11/x11_event_sub.h Examining data/aobook-1.0.3/mlib/src/x11/x11_event_sub.c Examining data/aobook-1.0.3/mlib/src/x11/x11_pixbuf.c Examining data/aobook-1.0.3/mlib/src/x11/x11_event.c Examining data/aobook-1.0.3/mlib/src/x11/x11_xinput2.h Examining data/aobook-1.0.3/mlib/src/x11/x11_clipboard.c Examining data/aobook-1.0.3/mlib/src/x11/x11_im.c Examining data/aobook-1.0.3/mlib/src/x11/x11_util.h Examining data/aobook-1.0.3/mlib/src/x11/x11_util.c Examining data/aobook-1.0.3/mlib/src/mMessageBox.c Examining data/aobook-1.0.3/mlib/src/mUtilStr.c Examining data/aobook-1.0.3/mlib/src/mFileList.c Examining data/aobook-1.0.3/mlib/src/mMenu.c Examining data/aobook-1.0.3/mlib/src/mBufOperate.c Examining data/aobook-1.0.3/mlib/src/mColorConv.c Examining data/aobook-1.0.3/mlib/src/mUtilCharCode.c Examining data/aobook-1.0.3/mlib/src/mGui_key.c Examining data/aobook-1.0.3/mlib/src/mAccelerator.c Examining data/aobook-1.0.3/mlib/src/mFont_common.c Examining data/aobook-1.0.3/mlib/src/mMemDebug.c Examining data/aobook-1.0.3/mlib/src/mList.c Examining data/aobook-1.0.3/mlib/src/mGui.c Examining data/aobook-1.0.3/mlib/src/image/mPixbuf_2.c Examining data/aobook-1.0.3/mlib/src/image/mLoadImage.c Examining data/aobook-1.0.3/mlib/src/image/mImageList.c Examining data/aobook-1.0.3/mlib/src/image/mLoadImage_bmp.c Examining data/aobook-1.0.3/mlib/src/image/mLoadImage_jpeg.c Examining data/aobook-1.0.3/mlib/src/image/mImageBuf.c Examining data/aobook-1.0.3/mlib/src/image/mPixbuf.c Examining data/aobook-1.0.3/mlib/src/image/mLoadImage_png.c Examining data/aobook-1.0.3/mlib/src/mNanoTime_common.c Examining data/aobook-1.0.3/mlib/src/mDef.c Examining data/aobook-1.0.3/mlib/src/widget/mCheckButton.c Examining data/aobook-1.0.3/mlib/src/widget/mComboBox.c Examining data/aobook-1.0.3/mlib/src/widget/mAboutDlg.c Examining data/aobook-1.0.3/mlib/src/widget/mLabel.c Examining data/aobook-1.0.3/mlib/src/widget/mDialog.c Examining data/aobook-1.0.3/mlib/src/widget/mInputTextDlg.c Examining data/aobook-1.0.3/mlib/src/widget/mArrowButton.c Examining data/aobook-1.0.3/mlib/src/widget/mListView.c Examining data/aobook-1.0.3/mlib/src/widget/mPopupProgress.c Examining data/aobook-1.0.3/mlib/src/widget/mFontDialog.c Examining data/aobook-1.0.3/mlib/src/widget/mInputAccelKey.c Examining data/aobook-1.0.3/mlib/src/widget/mTab.c Examining data/aobook-1.0.3/mlib/src/widget/mLineEdit.c Examining data/aobook-1.0.3/mlib/src/widget/mButton.c Examining data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c Examining data/aobook-1.0.3/mlib/src/widget/mFileDialog.c Examining data/aobook-1.0.3/mlib/src/widget/mColorPreview.c Examining data/aobook-1.0.3/mlib/src/widget/mSliderBar.c Examining data/aobook-1.0.3/mlib/src/widget/mFileListView.c Examining data/aobook-1.0.3/mlib/src/widget/mContainer_layout.c Examining data/aobook-1.0.3/mlib/src/widget/mProgressBar.c Examining data/aobook-1.0.3/mlib/src/widget/mColorButton.c Examining data/aobook-1.0.3/mlib/src/widget/mHSVPicker.c Examining data/aobook-1.0.3/mlib/src/widget/mGroupBox.c Examining data/aobook-1.0.3/mlib/src/widget/mTextButtons.c Examining data/aobook-1.0.3/mlib/src/widget/mScrollBar.c Examining data/aobook-1.0.3/mlib/src/widget/mScrollView.c Examining data/aobook-1.0.3/mlib/src/widget/mMenuBar.c Examining data/aobook-1.0.3/mlib/src/widget/mPopupWindow.c Examining data/aobook-1.0.3/mlib/src/widget/mWindow.c Examining data/aobook-1.0.3/mlib/src/widget/mContainer.c Examining data/aobook-1.0.3/mlib/src/widget/mColorDialog.c Examining data/aobook-1.0.3/mlib/src/widget/mFontButton.c Examining data/aobook-1.0.3/mlib/src/widget/mWidget.c Examining data/aobook-1.0.3/mlib/include/mBufOperate.h Examining data/aobook-1.0.3/mlib/include/mTab.h Examining data/aobook-1.0.3/mlib/include/mColorConv.h Examining data/aobook-1.0.3/mlib/include/mUtilSys.h Examining data/aobook-1.0.3/mlib/include/mIniWrite.h Examining data/aobook-1.0.3/mlib/include/mEvent.h Examining data/aobook-1.0.3/mlib/include/mKeyDef.h Examining data/aobook-1.0.3/mlib/include/mTextRead.h Examining data/aobook-1.0.3/mlib/include/mLineEdit.h Examining data/aobook-1.0.3/mlib/include/mMemDebug.h Examining data/aobook-1.0.3/mlib/include/mProgressBar.h Examining data/aobook-1.0.3/mlib/include/mConfig.h Examining data/aobook-1.0.3/mlib/include/mList.h Examining data/aobook-1.0.3/mlib/include/mUtilStr.h Examining data/aobook-1.0.3/mlib/include/mListViewItem.h Examining data/aobook-1.0.3/mlib/include/mRectBox.h Examining data/aobook-1.0.3/mlib/include/mColorPreview.h Examining data/aobook-1.0.3/mlib/include/mPixbuf.h Examining data/aobook-1.0.3/mlib/include/mTextButtons.h Examining data/aobook-1.0.3/mlib/include/mScrollBar.h Examining data/aobook-1.0.3/mlib/include/mFontButton.h Examining data/aobook-1.0.3/mlib/include/mWidgetDef.h Examining data/aobook-1.0.3/mlib/include/mPopupWindow.h Examining data/aobook-1.0.3/mlib/include/mPopupProgress.h Examining data/aobook-1.0.3/mlib/include/mStrDef.h Examining data/aobook-1.0.3/mlib/include/mClipboard.h Examining data/aobook-1.0.3/mlib/include/mPath.h Examining data/aobook-1.0.3/mlib/include/mArrowButton.h Examining data/aobook-1.0.3/mlib/include/mMessageBox.h Examining data/aobook-1.0.3/mlib/include/mScrollView.h Examining data/aobook-1.0.3/mlib/include/mComboBox.h Examining data/aobook-1.0.3/mlib/include/mLoadImage.h Examining data/aobook-1.0.3/mlib/include/mCursor.h Examining data/aobook-1.0.3/mlib/include/mFreeType.h Examining data/aobook-1.0.3/mlib/include/mFileDialog.h Examining data/aobook-1.0.3/mlib/include/mFileStat.h Examining data/aobook-1.0.3/mlib/include/mEnumFont.h Examining data/aobook-1.0.3/mlib/include/mNanoTime.h Examining data/aobook-1.0.3/mlib/include/mStr.h Examining data/aobook-1.0.3/mlib/include/mIOFileBuf.h Examining data/aobook-1.0.3/mlib/include/mButton.h Examining data/aobook-1.0.3/mlib/include/mAccelerator.h Examining data/aobook-1.0.3/mlib/include/mImageBuf.h Examining data/aobook-1.0.3/mlib/include/mSysX11.h Examining data/aobook-1.0.3/mlib/include/mZlib.h Examining data/aobook-1.0.3/mlib/include/mFont.h Examining data/aobook-1.0.3/mlib/include/mContainerDef.h Examining data/aobook-1.0.3/mlib/include/mFontConfig.h Examining data/aobook-1.0.3/mlib/include/mThread.h Examining data/aobook-1.0.3/mlib/include/mWidgetBuilder.h Examining data/aobook-1.0.3/mlib/include/mContainer.h Examining data/aobook-1.0.3/mlib/include/mUtilFile.h Examining data/aobook-1.0.3/mlib/include/mSysCol.h Examining data/aobook-1.0.3/mlib/include/mTextParam.h Examining data/aobook-1.0.3/mlib/include/mDef.h Examining data/aobook-1.0.3/mlib/include/mColorButton.h Examining data/aobook-1.0.3/mlib/include/mCheckButton.h Examining data/aobook-1.0.3/mlib/include/mHSVPicker.h Examining data/aobook-1.0.3/mlib/include/mMemAuto.h Examining data/aobook-1.0.3/mlib/include/mUtil.h Examining data/aobook-1.0.3/mlib/include/mDialog.h Examining data/aobook-1.0.3/mlib/include/mWidgets.h Examining data/aobook-1.0.3/mlib/include/mListDef.h Examining data/aobook-1.0.3/mlib/include/mSysDialog.h Examining data/aobook-1.0.3/mlib/include/mFTGSUB.h Examining data/aobook-1.0.3/mlib/include/mWidget.h Examining data/aobook-1.0.3/mlib/include/mMenu.h Examining data/aobook-1.0.3/mlib/include/mIniRead.h Examining data/aobook-1.0.3/mlib/include/mWindow.h Examining data/aobook-1.0.3/mlib/include/mDirEntry.h Examining data/aobook-1.0.3/mlib/include/mGui.h Examining data/aobook-1.0.3/mlib/include/mFileList.h Examining data/aobook-1.0.3/mlib/include/mFile.h Examining data/aobook-1.0.3/mlib/include/mWindowDef.h Examining data/aobook-1.0.3/mlib/include/mLabel.h Examining data/aobook-1.0.3/mlib/include/mGroupBox.h Examining data/aobook-1.0.3/mlib/include/mUtilCharCode.h Examining data/aobook-1.0.3/mlib/include/mDefGui.h Examining data/aobook-1.0.3/mlib/include/mSliderBar.h Examining data/aobook-1.0.3/mlib/include/mAppDef.h Examining data/aobook-1.0.3/mlib/include/mListView.h Examining data/aobook-1.0.3/mlib/include/mFileListView.h Examining data/aobook-1.0.3/mlib/include/mInputAccelKey.h Examining data/aobook-1.0.3/mlib/include/mImageList.h Examining data/aobook-1.0.3/mlib/include/mScrollViewArea.h Examining data/aobook-1.0.3/mlib/include/mUtilStdio.h Examining data/aobook-1.0.3/mlib/include/mTrans.h Examining data/aobook-1.0.3/mlib/include/mMenuBar.h FINAL RESULTS: data/aobook-1.0.3/mlib/src/linux/mUtilSys.c:69:3: [4] (shell) execl: This causes a new program to execute and is difficult to use safely (CWE-78). try using a library call that implements the same functionality if available. execl("/bin/sh", "sh", "-c", path, (char *)0); data/aobook-1.0.3/mlib/src/mDef.c:65:2: [4] (format) vfprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. vfprintf(stderr, format, arg); data/aobook-1.0.3/mlib/src/mGui_key.c:65:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(m, keyname1[c - MKEY_BREAK]); data/aobook-1.0.3/mlib/src/mGui_key.c:67:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(m, keyname2[c - MKEY_SPACE]); data/aobook-1.0.3/mlib/src/mGui_key.c:73:3: [4] (buffer) strcpy: Does not check for buffer overflows when copying to destination [MS-banned] (CWE-120). Consider using snprintf, strcpy_s, or strlcpy (warning: strncpy easily misused). strcpy(m, keyname3[c - MKEY_NUM_MUL]); data/aobook-1.0.3/mlib/src/mStr.c:207:6: [4] (format) snprintf: If format strings can be influenced by an attacker, they can be exploited, and note that sprintf variations do not always \0-terminate (CWE-134). Use a constant for the format specification. snprintf(m, 32, m2, va_arg(ap, int)); data/aobook-1.0.3/mlib/src/x11/x11_event.c:63:31: [4] (format) fprintf: If format strings can be influenced by an attacker, they can be exploited (CWE-134). Use a constant for the format specification. #define _PUT_DETAIL(fmt,...) fprintf(stderr, "xev:" fmt, __VA_ARGS__) data/aobook-1.0.3/mlib/src/linux/mPath.c:57:13: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. char *pc = getenv("HOME"); data/aobook-1.0.3/mlib/src/private/mTranslation.c:119:8: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pc = getenv("LANG"); data/aobook-1.0.3/mlib/src/x11/x11_util.c:417:7: [3] (buffer) getenv: Environment variables are untrustable input if they can be set by an attacker. They can have any content and length, and the same variable can be set more than once (CWE-807, CWE-20). Check environment variables carefully before using them. pc = getenv("DESKTOP_STARTUP_ID"); data/aobook-1.0.3/mlib/src/image/mImageBuf.c:136:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->dstbuf, buf, pitch); data/aobook-1.0.3/mlib/src/image/mImageList.c:192:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->dstbuf, buf, pitch); data/aobook-1.0.3/mlib/src/image/mLoadImage_bmp.c:509:5: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, ps, bytes); data/aobook-1.0.3/mlib/src/image/mLoadImage_bmp.c:584:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, p->rlebuf_cur, b2); data/aobook-1.0.3/mlib/src/image/mLoadImage_jpeg.c:168:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char msg[JMSG_LENGTH_MAX]; data/aobook-1.0.3/mlib/src/image/mLoadImage_png.c:536:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->rowbuf, ps, pitch); data/aobook-1.0.3/mlib/src/image/mPixbuf.c:702:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd + p->pitch, pd, p->pitch); data/aobook-1.0.3/mlib/src/image/mPixbuf.c:1081:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd + p->pitch_dir, pd, w); data/aobook-1.0.3/mlib/src/image/mPixbuf.c:1271:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, ps, size); data/aobook-1.0.3/mlib/src/lib/mFTGSUB.c:358:11: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. if(buf) memcpy(buf, dat.mem.buf, dat.mem.curpos); data/aobook-1.0.3/mlib/src/linux/mFile.c:84:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_RDONLY); data/aobook-1.0.3/mlib/src/linux/mFile.c:90:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, O_RDONLY); data/aobook-1.0.3/mlib/src/linux/mFile.c:110:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(filename, O_CREAT | O_WRONLY | O_TRUNC, 0644); data/aobook-1.0.3/mlib/src/linux/mFile.c:116:8: [2] (misc) open: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fd = open(fname, O_CREAT | O_WRONLY | O_TRUNC, 0644); data/aobook-1.0.3/mlib/src/linux/mPath.c:78:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/mAccelerator.c:144:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char name[32],*buf; data/aobook-1.0.3/mlib/src/mBufOperate.c:148:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, p->cur, size); data/aobook-1.0.3/mlib/src/mBufOperate.c:258:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->cur, buf, size); data/aobook-1.0.3/mlib/src/mDef.c:125:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, src, size); data/aobook-1.0.3/mlib/src/mDef.c:251:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, len + 1); data/aobook-1.0.3/mlib/src/mDef.c:256:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, src, len); data/aobook-1.0.3/mlib/src/mGui.c:103:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char *tmp[2]; data/aobook-1.0.3/mlib/src/mGui_key.c:60:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/mGui_key.c:71:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(m, "NUM%d", c - MKEY_NUM0); data/aobook-1.0.3/mlib/src/mGui_key.c:75:3: [2] (buffer) sprintf: Does not check for buffer overflows (CWE-120). Use sprintf_s, snprintf, or vsnprintf. Risk is low because the source has a constant maximum length. sprintf(m, "F%d", c - MKEY_F1 + 1); data/aobook-1.0.3/mlib/src/mIOFileBuf.c:156:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, p->bufcur, size); data/aobook-1.0.3/mlib/src/mIniRead.c:440:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/mIniRead.c:530:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *keyno = atoi(key); data/aobook-1.0.3/mlib/src/mIniRead.c:535:24: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *((int32_t *)buf) = atoi(param); data/aobook-1.0.3/mlib/src/mIniRead.c:548:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(pc); data/aobook-1.0.3/mlib/src/mIniRead.c:600:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, pc, len); data/aobook-1.0.3/mlib/src/mIniRead.c:624:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[16]; data/aobook-1.0.3/mlib/src/mIniRead.c:664:8: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). n = atoi(ps); data/aobook-1.0.3/mlib/src/mIniRead.c:768:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). srcsize = atoi(pc); data/aobook-1.0.3/mlib/src/mMemAuto.c:166:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->buf + p->curpos, dat, size); data/aobook-1.0.3/mlib/src/mMemDebug.c:283:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pret, str, len); data/aobook-1.0.3/mlib/src/mMemDebug.c:306:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pret, str, len); data/aobook-1.0.3/mlib/src/mStr.c:112:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32],m2[16]; data/aobook-1.0.3/mlib/src/mStr.c:351:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->buf, src->buf, src->len + 1); data/aobook-1.0.3/mlib/src/mStr.c:477:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->buf, text, len + 1); data/aobook-1.0.3/mlib/src/mStr.c:491:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->buf, text, len); data/aobook-1.0.3/mlib/src/mStr.c:502:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[20]; data/aobook-1.0.3/mlib/src/mStr.c:610:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c,m[6]; data/aobook-1.0.3/mlib/src/mStr.c:632:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c,m[3] = {0,0,0}; data/aobook-1.0.3/mlib/src/mStr.c:664:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c,m[3] = {0,0,0}; data/aobook-1.0.3/mlib/src/mStr.c:713:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[3] = {0,0,0}; data/aobook-1.0.3/mlib/src/mStr.c:785:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char c,flag,m[6]; data/aobook-1.0.3/mlib/src/mStr.c:865:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->buf + str->len, text, len + 1); data/aobook-1.0.3/mlib/src/mStr.c:877:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->buf + str->len, text, len); data/aobook-1.0.3/mlib/src/mStr.c:888:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[20]; data/aobook-1.0.3/mlib/src/mStr.c:900:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[64]; data/aobook-1.0.3/mlib/src/mStr.c:940:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst->buf + dst->len, src->buf, src->len + 1); data/aobook-1.0.3/mlib/src/mStr.c:971:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(str->buf, text, len); data/aobook-1.0.3/mlib/src/mStr.c:1081:10: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). return atoi(str->buf); data/aobook-1.0.3/mlib/src/mStr.c:1104:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *(dst++) = atoi(p); data/aobook-1.0.3/mlib/src/mUtil.c:275:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, str, u32); data/aobook-1.0.3/mlib/src/mUtil.c:321:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, str, u32); data/aobook-1.0.3/mlib/src/mUtil.c:355:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[4]; data/aobook-1.0.3/mlib/src/mUtilCharCode.c:296:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char mb[MB_CUR_MAX]; data/aobook-1.0.3/mlib/src/mUtilCharCode.c:328:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, mb, ret); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:533:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, src, size); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:611:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, m, clen); data/aobook-1.0.3/mlib/src/mUtilStdio.c:64:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(fname, mode); data/aobook-1.0.3/mlib/src/mUtilStr.c:187:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, text, len); data/aobook-1.0.3/mlib/src/private/mEditTextBuf.c:476:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[2]; data/aobook-1.0.3/mlib/src/private/mEditTextBuf.c:890:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[2]; data/aobook-1.0.3/mlib/src/widget/mColorDialog.c:113:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char label[6] = {'H','S','V','R','G','B'},m[2] = {0,0}; data/aobook-1.0.3/mlib/src/widget/mInputTextDlg.c:197:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num = atoi(str.buf); data/aobook-1.0.3/mlib/src/widget/mLabel.c:251:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/widget/mLabel.c:261:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/widget/mLineEdit.c:375:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/widget/mLineEdit.c:386:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/mlib/src/widget/mLineEdit.c:407:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[64]; data/aobook-1.0.3/mlib/src/widget/mProgressBar.c:253:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32],*ptext; data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c:229:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). *(dst++) = atoi(param); data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c:280:12: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). dst[1] = atoi(param + 1); data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c:309:18: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). text = M_TR_T(atoi(param)); data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c:364:9: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). num = atoi(param + 1); data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c:424:14: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). wg->id = atoi(param); data/aobook-1.0.3/mlib/src/widget/mWidgetBuilder.c:470:45: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). mLineEditSetWidthByLen(M_LINEEDIT(wg), atoi(param)); data/aobook-1.0.3/mlib/src/x11/x11_clipboard.c:132:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, atoms, sizeof(Atom) * atom_num); data/aobook-1.0.3/mlib/src/x11/x11_clipboard.c:203:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->datbuf, datbuf, datsize); data/aobook-1.0.3/mlib/src/x11/x11_event.c:266:3: [2] (buffer) wchar_t: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. wchar_t wc[32],*pwc = NULL; data/aobook-1.0.3/mlib/src/x11/x11_event.c:308:3: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[16]; data/aobook-1.0.3/mlib/src/x11/x11_keyconv.c:207:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, name, len); data/aobook-1.0.3/mlib/src/x11/x11_main.c:86:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char buf[256],m[32],reqbuf[256]; data/aobook-1.0.3/mlib/src/x11/x11_util.c:151:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf, pdat, sizeof(long) * num); data/aobook-1.0.3/mlib/src/x11/x11_util.c:215:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pdst, pdat, nitems * sizeof(long)); data/aobook-1.0.3/mlib/src/x11/x11_util.c:274:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(buf + offset, pdat, nitems); data/aobook-1.0.3/mlib/src/x11/x11_util.c:388:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(dst, ps, size); data/aobook-1.0.3/src/appicon.h:1:10: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. unsigned char g_appicon[2294] = { data/aobook-1.0.3/src/bookmarkdat.c:184:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). item->lineno = atoi(pc) - 1; data/aobook-1.0.3/src/bookmarkdat.c:306:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). item->lineno = atoi(pc) - 1; data/aobook-1.0.3/src/envoptdlg.c:102:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(p->edit.mousectrl, GDAT->mousectrl, MOUSECTRL_BTT_NUM); data/aobook-1.0.3/src/envoptdlg_mouse.c:180:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(GDAT->mousectrl, editbuf, MOUSECTRL_BTT_NUM); data/aobook-1.0.3/src/globaldata.c:145:2: [2] (buffer) char: Statically-sized arrays can be improperly restricted, leading to potential overflows or other issues (CWE-119!/CWE-120). Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length. char m[32]; data/aobook-1.0.3/src/main.c:229:3: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(GDAT->mousectrl, def, 4); data/aobook-1.0.3/src/style.c:402:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(&dst->b, &src->b, sizeof(AO_STYLE)); data/aobook-1.0.3/src/sub/aoLayout.c:286:2: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(info->titleNum, dat.titleNum, sizeof(int) * 3); data/aobook-1.0.3/translation/mtrconv.c:130:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "rb"); data/aobook-1.0.3/translation/mtrconv.c:258:7: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). id = atoi(line + 1); data/aobook-1.0.3/translation/mtrconv.c:331:19: [2] (integer) atoi: Unless checked, the resulting number can exceed the expected range (CWE-190). If source untrusted, check both minimum and maximum, even if the input had no minus sign (large numbers can roll over into negative number; consider saving to an unsigned value if that is intended). id = p->curid = atoi(line); data/aobook-1.0.3/translation/mtrconv.c:420:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "wb"); data/aobook-1.0.3/translation/mtrconv.c:442:7: [2] (misc) fopen: Check when opening files - can an attacker redirect it (via symlinks), force the opening of special file type (e.g., device files), move things around to create a race condition, control its ancestors, or change its contents? (CWE-362). fp = fopen(filename, "wb"); data/aobook-1.0.3/translation/mtrconv.c:574:4: [2] (buffer) memcpy: Does not check for buffer overflows when copying to destination (CWE-120). Make sure destination can always hold the source data. memcpy(pd, pi->text, pi->len); data/aobook-1.0.3/mlib/src/image/mLoadImage_bmp.c:378:13: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). int remain,read; data/aobook-1.0.3/mlib/src/image/mLoadImage_bmp.c:399:7: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). if(read < RLE_BUFSIZE - remain) data/aobook-1.0.3/mlib/src/image/mLoadImage_bmp.c:402:14: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). remain += read; data/aobook-1.0.3/mlib/src/linux/mFile.c:188:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(file, buf, size); data/aobook-1.0.3/mlib/src/linux/mFile.c:207:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). ret = read(file, (uint8_t *)buf + readsize, size - readsize); data/aobook-1.0.3/mlib/src/linux/mFile.c:251:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mDef.c:205:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(str); data/aobook-1.0.3/mlib/src/mDef.c:246:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(src); data/aobook-1.0.3/mlib/src/mDef.c:270:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). return strlen(str); data/aobook-1.0.3/mlib/src/mIniRead.c:597:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(pc); data/aobook-1.0.3/mlib/src/mIniRead.c:659:46: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(ps = srcbuf; *ps && num < bufnum; ps += strlen(ps) + 1) data/aobook-1.0.3/mlib/src/mMemDebug.c:278:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(str) + 1; data/aobook-1.0.3/mlib/src/mMemDebug.c:300:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). max = strlen(str); data/aobook-1.0.3/mlib/src/mStr.c:307:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). str->len = strlen(str->buf); data/aobook-1.0.3/mlib/src/mStr.c:473:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mStr.c:861:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mStr.c:919:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(len < 0) len = strlen(text); data/aobook-1.0.3/mlib/src/mStr.c:966:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mTextParam.c:371:38: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(pc = words, no = 0; *pc; pc += strlen(pc) + 1, no++) data/aobook-1.0.3/mlib/src/mUtil.c:274:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). u32 = strlen(str); data/aobook-1.0.3/mlib/src/mUtil.c:320:10: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). u32 = strlen(str); data/aobook-1.0.3/mlib/src/mUtil.c:423:20: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(len < 0) len = strlen(src); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:172:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(srclen < 0) srclen = strlen(src); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:234:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(srclen < 0) srclen = strlen(src); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:301:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(srclen < 0) srclen = strlen(src); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:382:26: [1] (buffer) wcslen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(srclen < 0) srclen = wcslen(src); data/aobook-1.0.3/mlib/src/mUtilCharCode.c:442:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). if(srclen < 0) srclen = strlen(src); data/aobook-1.0.3/mlib/src/mUtilStdio.c:175:12: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). int len = strlen(text); data/aobook-1.0.3/mlib/src/mUtilStdio.c:479:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mUtilStdio.c:511:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mUtilStr.c:182:16: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (text)? strlen(text): 0; data/aobook-1.0.3/mlib/src/mUtilStr.c:255:9: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/mUtilStr.c:502:27: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). for(pc = pat; *pc; pc += strlen(pc) + 1) data/aobook-1.0.3/mlib/src/mUtilStr.c:529:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(text); data/aobook-1.0.3/mlib/src/private/mLVItemMan.c:103:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pi->textlen = strlen(text); data/aobook-1.0.3/mlib/src/widget/mFileDialog.c:199:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pc2 = pc + strlen(pc) + 1; data/aobook-1.0.3/mlib/src/widget/mFileDialog.c:204:14: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pc = pc2 + strlen(pc2) + 1; data/aobook-1.0.3/mlib/src/widget/mLabel.c:109:26: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pcnext = p->lb.text + strlen(p->lb.text); data/aobook-1.0.3/mlib/src/x11/x11_keyconv.c:204:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(name); data/aobook-1.0.3/mlib/src/x11/x11_main.c:542:9: [1] (buffer) read: Check buffer boundaries if used in a loop including recursive loops (CWE-120, CWE-20). while(read(p->fd_pipe[0], &dat, 4) > 0); data/aobook-1.0.3/mlib/src/x11/x11_util.c:375:8: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = strlen(sendstr) + 1; data/aobook-1.0.3/mlib/src/x11/x11_window.c:424:17: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). len = (title)? strlen(title): 0; data/aobook-1.0.3/translation/mtrconv.c:346:13: [1] (buffer) strlen: Does not handle strings that are not \0-terminated; if given one it may perform an over-read (it could cause a crash if unprotected) (CWE-126). pi->len = strlen(pc) + 1; ANALYSIS SUMMARY: Hits = 158 Lines analyzed = 68247 in approximately 1.53 seconds (44747 lines/second) Physical Source Lines of Code (SLOC) = 35302 Hits@level = [0] 62 [1] 43 [2] 105 [3] 3 [4] 7 [5] 0 Hits@level+ = [0+] 220 [1+] 158 [2+] 115 [3+] 10 [4+] 7 [5+] 0 Hits/KSLOC@level+ = [0+] 6.23194 [1+] 4.47567 [2+] 3.25761 [3+] 0.28327 [4+] 0.198289 [5+] 0 Dot directories skipped = 1 (--followdotdir overrides) Minimum risk level = 1 Not every hit is necessarily a security vulnerability. There may be other security vulnerabilities; review your code! See 'Secure Programming HOWTO' (https://dwheeler.com/secure-programs) for more information.