From patchwork Tue Jul 30 14:09:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramiro Polla X-Patchwork-Id: 50820 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b88e:0:b0:489:2eb3:e4c4 with SMTP id p14csp494442vqn; Tue, 30 Jul 2024 07:47:02 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXEbs3QUm/rrMbaasM/8qsxJpp/znZME4Np2lcNBy6NujTePx+T+6j6Y4ynMe8S2/Gyoq3W1XH0s6rqARG4HSrQvw/WfW49VH5BBw== X-Google-Smtp-Source: AGHT+IHHVet8E85Cr9lKMEN5B9iCcuK3zMHNmLYgQfipmJO88Vt6FsLsOGl2BOXNrYV9tj9Wydjs X-Received: by 2002:a2e:95d7:0:b0:2ef:1b64:531b with SMTP id 38308e7fff4ca-2f12ee6a4b1mr74839021fa.42.1722350821200; Tue, 30 Jul 2024 07:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722350821; cv=none; d=google.com; s=arc-20160816; b=m/OL0BensMAoRkgadscFfbiC79mpCzebECNK02gipO2gU6iC2ZRVIoPre41SLLrnUu CPlS5bMsdnGRWguhKYGtIshmqNN9UWC+2qVOVjjZDfJ0WWo97XFRp66hCgZqH4JWHDUJ KPiKQNYU7EcZCITvPXSyuB7bpCoRteWCTfMEEElH95avIUXaODmCUMNpVP6cblWp4aX3 yfJGl49H3bTn0I2YjkgG+fDbLyOL9GV1l6R5GjpJKvNo6WDJOR0WBJYPF3PdoXtN0Tkj 7NMs0RQ/FRj4iUSBpHZ71bEF2a41zoxHZnN68XH/a8nE/2fR4MkjDrIHRXPO6qlP7opg 5NEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=bjGq169E1XNjO6bZMzf5I845dadh1R+DuoqOz0U0CJg=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=jdq4LaEFC872i8QlBoLrY3dQjrt9Wf2je3d+/HdJcI5JWkMZ+T5iQUcXS6lQxYWdRj R9W4lS/qaR/hJTGF+IN4U+2ShuGRpR11y3LjkFV7/HO/QX9uYKTtwjfxrGFCamO+86EU 6t4+UvXpOQueqLdfQgBtbKV6asyEg2tkwncWjjOI6q7erbjj878v90icddYzQP8Fc+rG jXyDasGuvRk3eVwg/eXL8fg4UCFj/DJrrb6uzpafaQYh5n3vz5QVqVVeYlPrHOJmBKzA n2AUA1yKAstGZEL0XGKoMUXIV0h3RFSAHsARdLF+E4xHHVexasLB2EoUvnpWtCe3Auaq TKaw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=CsUVvhaC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 38308e7fff4ca-2f03d189f3csi32657861fa.598.2024.07.30.07.47.00; Tue, 30 Jul 2024 07:47:01 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=CsUVvhaC; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A42CB68D7D2; Tue, 30 Jul 2024 17:09:36 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-lf1-f41.google.com (mail-lf1-f41.google.com [209.85.167.41]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 18F0768D7C8 for ; Tue, 30 Jul 2024 17:09:30 +0300 (EEST) Received: by mail-lf1-f41.google.com with SMTP id 2adb3069b0e04-52fc4388a64so7978614e87.1 for ; Tue, 30 Jul 2024 07:09:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722348568; x=1722953368; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=5da+ftX/eXl41eyww+dyIkqqQqENJyQIVJy7Ee4aFTY=; b=CsUVvhaCvnHwSagJJkqGaWe4WVF1aQGVPEa2FCu7icwWLrO1JGjpmWVfWg2g18MhOt hWp+4HVHmbghMveUV0hu+EuKX2tM66JgQYirL5+pek6QrscCzkFY4wMOTlRx7UIPi1BH 9/gVMyIFxdryKhKnKt7JYGlx/A1mXT2Sv2hMfaoTOArSjeYl4g++kFdgLlUUxYj0xURV FjW1V5MGBAWJymOvBwLCTKIzRJ1ykSwqp5iJUr/1bGte0mHO3Q3tWFilUUgnTia+wMEf yfVz6w7V9/6nxzHUilpdRCprUZciq+wdhHHipC5tk6N/rRpR2z9hZnVB33ErcMJiHTB7 8pgw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722348568; x=1722953368; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5da+ftX/eXl41eyww+dyIkqqQqENJyQIVJy7Ee4aFTY=; b=gJSf528W3fmer3pBJSi9JoNbYKdeyFB4j9Z7T/W2VZ2ZrFAidRllYGjOIpX3FoElh7 XyKDb7paDZwdutGx7l/CdlF4caQapIBSQ3dJctfHozgb+Un3MXk6ayfCR7Oia0s/w0sz mYNttLT8QcuwD8yGPKN/Z27o9voJPSzCInVoUzHS0bUqlyfdYadL9+tyx/5M3HFP35J/ T14JZzlk6Ed/nRmZPADndV+61/6CAu9MWwtDBOh0JLIig55WGtSNRPpAkA7yuuqYmbOT tIF5/LqqcfS12dhjJUg6HrFoVc2WqJRzyDxgab5XNmXmeuWvJ7+oKXvnM6WJSFAwC966 1Ojg== X-Gm-Message-State: AOJu0YyomKRgEqCnexeEfUZ1kF5QYZQJvaO+KpArmM3g6qIjvQi510Wx y/bUjV7ZP7REBE3CA/B7Tx/hwqsmiksdbI/+AYuSUeDFGpaNJJsZptEEtQ4Y X-Received: by 2002:a05:6000:1a88:b0:369:ba89:a577 with SMTP id ffacd0b85a97d-36b5d03cc5bmr8604988f8f.34.1722348557607; Tue, 30 Jul 2024 07:09:17 -0700 (PDT) Received: from localhost.localdomain (232.39-67-87.adsl-dyn.isp.belgacom.be. [87.67.39.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857d66sm14762189f8f.83.2024.07.30.07.09.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 07:09:17 -0700 (PDT) From: Ramiro Polla To: ffmpeg-devel@ffmpeg.org Date: Tue, 30 Jul 2024 16:09:14 +0200 Message-Id: <20240730140915.225143-2-ramiro.polla@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240730140915.225143-1-ramiro.polla@gmail.com> References: <20240730140915.225143-1-ramiro.polla@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] compat/w32dlfcn: remove backup definitions for safe LoadLibrary flags X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 8fPdZHAI0qDc Since we now expect C17, it is safe to assume that the toolchain will have these flags defined. --- compat/w32dlfcn.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h index ac20e83a7a..8ae718f4bd 100644 --- a/compat/w32dlfcn.h +++ b/compat/w32dlfcn.h @@ -120,12 +120,6 @@ exit: return module; } #endif -#ifndef LOAD_LIBRARY_SEARCH_APPLICATION_DIR -# define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200 -#endif -#ifndef LOAD_LIBRARY_SEARCH_SYSTEM32 -# define LOAD_LIBRARY_SEARCH_SYSTEM32 0x00000800 -#endif #if HAVE_WINRT if (!name_w) return NULL; From patchwork Tue Jul 30 14:09:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramiro Polla X-Patchwork-Id: 50819 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a59:b88e:0:b0:489:2eb3:e4c4 with SMTP id p14csp494427vqn; Tue, 30 Jul 2024 07:47:01 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX0xggYki7XCIgq/9DpjJQOGf9U4F92Fi7PYPDolIOOLX9PMDI3zhYKlXpQpVTGXRndD1Ki4KxecHVqMpOmHNh9QPzdAU+BC/4NoQ== X-Google-Smtp-Source: AGHT+IEB9kmNTbkWWPGSPUAXoQt6uABXt0/WgowyOZ7QDR98sTd2wkbnkoBgBUDKI5nlCykZfl28 X-Received: by 2002:a2e:8519:0:b0:2ef:296d:1dda with SMTP id 38308e7fff4ca-2f12ebcb00bmr75185711fa.1.1722350820881; Tue, 30 Jul 2024 07:47:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722350820; cv=none; d=google.com; s=arc-20160816; b=w2Xupnh4b6uGc694yC/UoEc3PDqNkp0zU63kb2Fql78nuWjXXGjkDf8ubTXMhy8EoL 8vSnVJo0hk/4FUYZ8ZQmMn87QjclCaH8G2QDWTVDujQ4R0plEmEU8UQLwcdNSJq4pO9H ul9/7NV8OUKUgYAt3OYTZ4qMx/a2IfwSw7d9CfcxRgPXyHjluSpREv+iBRJvbi2m5htL T0x62fK1FTidgaDSj4odV5RDatb7Kbo/ukXFO0e/54rU/VxjRn7WWz1Yryl6ugDVYmDj Wp98J8HcqN4/o0HzXgdD0jLzdxiuSCQoH52u5F3HMFBXgEuT9rZTwcRCo8DaO/6/4ji0 wf9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:mime-version:references:in-reply-to:message-id :date:to:from:dkim-signature:delivered-to; bh=nEWAWhASRW17dVBv3oupMUI8aTc7bel5vYPaQg+DfSw=; fh=YOA8vD9MJZuwZ71F/05pj6KdCjf6jQRmzLS+CATXUQk=; b=OXv5PZkG2c2QsGQ+hAXsjl2oEgP8MmrLbb0OD8JtM2kA2pWYVm7qnDAA0xBRMwRbBi gLNEPEYPYYqWyQjC8iTTwClQiiM585NnzQ7yeciP0ykMcFrD2g3oGiKtu2bWsKbfkRbr i0mjC8KHFa00icCXOFsfBOIq1N5wvmXskQBu7fhbVHrXskUlDOIj1hs6odT7FJQasiLA FE0pY1zUbqStE3cdj02VN+y1FkVay4h2kbS7EFXkRQtfdY/Ns734RBVUuuut6nTK7nAK jmMlkDyyF+lmbWNOaw74Eug1Va2FgU49YDGBlJkvlcWSIRW5xO/5F+DdO+sJvO9R5KAY 9iYw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=H3t7CyRb; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id 4fb4d7f45d1cf-5ac66233a16si8231082a12.639.2024.07.30.07.47.00; Tue, 30 Jul 2024 07:47:00 -0700 (PDT) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20230601 header.b=H3t7CyRb; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com; dara=fail header.i=@gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6505068D7B0; Tue, 30 Jul 2024 17:09:32 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3ECBC68BDE1 for ; Tue, 30 Jul 2024 17:09:24 +0300 (EEST) Received: by mail-wr1-f48.google.com with SMTP id ffacd0b85a97d-3683329f787so2356011f8f.1 for ; Tue, 30 Jul 2024 07:09:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1722348558; x=1722953358; darn=ffmpeg.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=OwlsTleMWMlLhJ5Axbh0kz3T0qisKl/O1A8anqYWcuQ=; b=H3t7CyRboIAw59QafPZgt849HDr4alB0+kAo7Mtal9xDB2Z652uPA8AmKTWFwewY2d roIeP5ZvLoXGXUzluBgZjL6r9mLy1HOX4QmcD1xu9vTCv4zzDWoIoJCJT6q/5a+LGApH gHu+Q1px9L6ONvL7Ob/t72VvcXxz0k/X8clzHAP8ddhv/+jDt8zpmR2cDJiIQszw0/Ad nT6Q7OlF1C9/8h6L2Uzt/7vd0Nhp39x4+X6O7WlXFbQOhBauIYePREpe5rbKrXSUCnx1 q7kr7/6hZWgrXWLVq02BaQIyr9axBY3xo47SVJeX4SMYEvZJREJSM6pWHWCTDpIZIR5/ Rr7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722348558; x=1722953358; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OwlsTleMWMlLhJ5Axbh0kz3T0qisKl/O1A8anqYWcuQ=; b=pJMvIW9inuhsMGEtJUCsegopxqeS6UXBX+tqc7F9SQrQv6vmct2R7V11bDaSO7Bh84 WgkFgQvi9S751+CUeseGCiTWiXAnFZFCpicgslPxhUr5oJ4tOC0ehbKGCN/8b6URJUVQ /JQvTP36Sjt0D5hJ5ucVzNRqXZ4gWp8s+QTGg5DdO3sdn86IJj2dSQkkoAGtDSrQQM5O QxaYlsKkliSEOgf2Iyxkl/l0N1zWdsv2aqoOXNBy785KnN6WbuZ0mSd7SmC2j3hR6Icm QbAh+/heupNmS7wBoc6YFzFss7qFqlbXPTfe9iQSZCFgTUZr2gDSkHHr9TuJKO4LO5Mg oPZg== X-Gm-Message-State: AOJu0YwZX9qr8VXikT9VxePNQRdwI01sizsWm/odP03c3b1BXywURhnY pqVzMixBGGFXcQPvZaqF+5tdZO60oPo3ueBbHn8hYpIrcvlaQuPdKBgdzRa3 X-Received: by 2002:a5d:428f:0:b0:368:6650:fd16 with SMTP id ffacd0b85a97d-36b5d0aecc8mr7111358f8f.38.1722348558392; Tue, 30 Jul 2024 07:09:18 -0700 (PDT) Received: from localhost.localdomain (232.39-67-87.adsl-dyn.isp.belgacom.be. [87.67.39.232]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b36857d66sm14762189f8f.83.2024.07.30.07.09.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 30 Jul 2024 07:09:18 -0700 (PDT) From: Ramiro Polla To: ffmpeg-devel@ffmpeg.org Date: Tue, 30 Jul 2024 16:09:15 +0200 Message-Id: <20240730140915.225143-3-ramiro.polla@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20240730140915.225143-1-ramiro.polla@gmail.com> References: <20240730140915.225143-1-ramiro.polla@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 2/2] compat/w32dlfcn: remove support for pre-KB2533623 Win7 systems X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: 7UnkFqMX3mGv The KB2533623 security update has been released 13 years ago and Windows 7 has reached end of extended support 4 years ago. --- compat/w32dlfcn.h | 52 ----------------------------------------------- 1 file changed, 52 deletions(-) diff --git a/compat/w32dlfcn.h b/compat/w32dlfcn.h index 8ae718f4bd..856ad74cc1 100644 --- a/compat/w32dlfcn.h +++ b/compat/w32dlfcn.h @@ -68,58 +68,6 @@ static inline HMODULE win32_dlopen(const char *name) HMODULE module = NULL; if (utf8towchar(name, &name_w)) name_w = NULL; -#if _WIN32_WINNT < 0x0602 - // On Win7 and earlier we check if KB2533623 is available - if (!GetProcAddress(GetModuleHandleW(L"kernel32.dll"), "SetDefaultDllDirectories")) { - wchar_t *path = NULL, *new_path; - DWORD pathlen, pathsize, namelen; - if (!name_w) - goto exit; - namelen = wcslen(name_w); - // Try local directory first - path = get_module_filename(NULL); - if (!path) - goto exit; - new_path = wcsrchr(path, '\\'); - if (!new_path) - goto exit; - pathlen = new_path - path; - pathsize = pathlen + namelen + 2; - new_path = av_realloc_array(path, pathsize, sizeof *path); - if (!new_path) - goto exit; - path = new_path; - wcscpy(path + pathlen + 1, name_w); - module = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - if (module == NULL) { - // Next try System32 directory - pathlen = GetSystemDirectoryW(path, pathsize); - if (!pathlen) - goto exit; - // Buffer is not enough in two cases: - // 1. system directory + \ + module name - // 2. system directory even without the module name. - if (pathlen + namelen + 2 > pathsize) { - pathsize = pathlen + namelen + 2; - new_path = av_realloc_array(path, pathsize, sizeof *path); - if (!new_path) - goto exit; - path = new_path; - // Query again to handle the case #2. - pathlen = GetSystemDirectoryW(path, pathsize); - if (!pathlen) - goto exit; - } - path[pathlen] = L'\\'; - wcscpy(path + pathlen + 1, name_w); - module = LoadLibraryExW(path, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - } -exit: - av_free(path); - av_free(name_w); - return module; - } -#endif #if HAVE_WINRT if (!name_w) return NULL;